示例#1
0
文件: faup.c 项目: pombredanne/faup
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;
}
示例#2
0
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;
}