faup_handler_t *faup_init(faup_options_t *options) { faup_handler_t *fh; int retval; fh = malloc(sizeof(faup_handler_t)); if (options) { fh->options = options; } else { fh->options = faup_options_new(); } #ifdef FAUP_LUA_MODULES retval = faup_modules_new(fh); #endif return fh; }
faup_handler_t *faup_init(faup_options_t *options) { faup_handler_t *fh; int retval; fh = malloc(sizeof(faup_handler_t)); fh->faup.decoded = false; fh->faup.url_type = FAUP_URL_HAS_NO_TLD; memset(&fh->faup.features, 0, sizeof(fh->faup.features)); if (options) { fh->options = options; } else { fh->options = faup_options_new(); } #ifdef FAUP_LUA_MODULES retval = faup_modules_new(fh); #endif return fh; }