diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2020-06-18 17:10:22 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-06-18 17:10:22 +0200 |
commit | 607567b9cd750a018f7af2d22ea63bf42be106fa (patch) | |
tree | 4121a2bfcabbab124ba1921ebbb43ff145366ccc /ext/enchant | |
parent | 48e16a9dba12cae799583ec145d586d09e7cc5a1 (diff) | |
download | php-git-607567b9cd750a018f7af2d22ea63bf42be106fa.tar.gz |
Call zpp in enchant_broker_*_dict_path with libenchant-2
Even if the function is a dummy, we still need to call zpp to
comply with arginfo.
Diffstat (limited to 'ext/enchant')
-rw-r--r-- | ext/enchant/enchant.c | 29 |
1 files changed, 7 insertions, 22 deletions
diff --git a/ext/enchant/enchant.c b/ext/enchant/enchant.c index 5f7e043730..19918e8a84 100644 --- a/ext/enchant/enchant.c +++ b/ext/enchant/enchant.c @@ -346,13 +346,11 @@ PHP_FUNCTION(enchant_broker_get_error) } /* }}} */ -#if HAVE_ENCHANT_BROKER_SET_PARAM /* {{{ proto bool enchant_broker_set_dict_path(resource broker, int dict_type, string value) Set the directory path for a given backend, works with ispell and myspell */ PHP_FUNCTION(enchant_broker_set_dict_path) { zval *broker; - enchant_broker *pbroker; zend_long dict_type; char *value; size_t value_len; @@ -361,6 +359,8 @@ PHP_FUNCTION(enchant_broker_set_dict_path) RETURN_THROWS(); } +#if HAVE_ENCHANT_BROKER_SET_PARAM + enchant_broker *pbroker; if (!value_len) { RETURN_FALSE; } @@ -383,6 +383,7 @@ PHP_FUNCTION(enchant_broker_set_dict_path) default: RETURN_FALSE; } +#endif } /* }}} */ @@ -392,14 +393,15 @@ PHP_FUNCTION(enchant_broker_set_dict_path) PHP_FUNCTION(enchant_broker_get_dict_path) { zval *broker; - enchant_broker *pbroker; zend_long dict_type; - char *value; if (zend_parse_parameters(ZEND_NUM_ARGS(), "Ol", &broker, enchant_broker_ce, &dict_type) == FAILURE) { RETURN_THROWS(); } +#if HAVE_ENCHANT_BROKER_SET_PARAM + enchant_broker *pbroker; + char *value; PHP_ENCHANT_GET_BROKER; switch (dict_type) { @@ -423,26 +425,9 @@ PHP_FUNCTION(enchant_broker_get_dict_path) } RETURN_STRING(value); +#endif } /* }}} */ -#else -/* {{{ proto bool enchant_broker_set_dict_path(resource broker, int dict_type, string value) - Set the directory path for a given backend, works with ispell and myspell */ -PHP_FUNCTION(enchant_broker_set_dict_path) -{ - RETURN_FALSE; -} -/* }}} */ - - -/* {{{ proto string enchant_broker_get_dict_path(resource broker, int dict_type) - Get the directory path for a given backend, works with ispell and myspell */ -PHP_FUNCTION(enchant_broker_get_dict_path) -{ - RETURN_FALSE; -} -/* }}} */ -#endif /* {{{ proto array enchant_broker_list_dicts(resource broker) Lists the dictionaries available for the given broker */ |