From: Pierre Joye Date: Tue, 13 Jan 2009 13:30:04 +0000 (+0000) Subject: - fix build X-Git-Tag: php-5.4.0alpha1~191^2~4534 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d2925999eddb8dbf76427bc543273bb30cc4c91d;p=php - fix build --- diff --git a/ext/enchant/enchant.c b/ext/enchant/enchant.c index f47a2b34e3..1cf68ad575 100755 --- a/ext/enchant/enchant.c +++ b/ext/enchant/enchant.c @@ -22,6 +22,8 @@ #ifdef HAVE_CONFIG_H #include "config.h" #endif +#include +#include #include #include "php.h" #include "php_ini.h" @@ -83,7 +85,7 @@ function_entry enchant_functions[] = { PHP_FE(enchant_dict_store_replacement, NULL) PHP_FE(enchant_dict_get_error, NULL) PHP_FE(enchant_dict_describe, NULL) - PHP_FE(enchant_dict_quick_check, third_arg_force_ref) + PHP_FE(enchant_dict_quick_check, NULL) {NULL, NULL, NULL} /* Must be the last line in enchant_functions[] */ }; @@ -569,13 +571,13 @@ PHP_FUNCTION(enchant_dict_quick_check) PHP_ENCHANT_GET_DICT; if (enchant_dict_check(pdict->pdict, word, wordlen) > 0) { + int n_sugg; + char **suggs; + if (!sugg && ZEND_NUM_ARGS() == 2) { RETURN_FALSE; } - int n_sugg; - char **suggs; - array_init(sugg); suggs = enchant_dict_suggest(pdict->pdict, word, wordlen, (size_t *) &n_sugg);