diff --git a/ext/filter/filter.c b/ext/filter/filter.c index 996308a4181de..8feae0a3dfa11 100644 --- a/ext/filter/filter.c +++ b/ext/filter/filter.c @@ -78,26 +78,12 @@ static const filter_list_entry filter_list[] = { static unsigned int php_sapi_filter(int arg, char *var, char **val, size_t val_len, size_t *new_val_len); static unsigned int php_sapi_filter_init(void); -/* {{{ filter_functions[] - */ -static const zend_function_entry filter_functions[] = { - PHP_FE(filter_input, arginfo_filter_input) - PHP_FE(filter_var, arginfo_filter_var) - PHP_FE(filter_input_array, arginfo_filter_input_array) - PHP_FE(filter_var_array, arginfo_filter_var_array) - PHP_FE(filter_list, arginfo_filter_list) - PHP_FE(filter_has_var, arginfo_filter_has_var) - PHP_FE(filter_id, arginfo_filter_id) - PHP_FE_END -}; -/* }}} */ - /* {{{ filter_module_entry */ zend_module_entry filter_module_entry = { STANDARD_MODULE_HEADER, "filter", - filter_functions, + ext_functions, PHP_MINIT(filter), PHP_MSHUTDOWN(filter), NULL, diff --git a/ext/filter/filter.stub.php b/ext/filter/filter.stub.php index 31a7f2c3e6166..5014e60dd95e0 100644 --- a/ext/filter/filter.stub.php +++ b/ext/filter/filter.stub.php @@ -1,5 +1,7 @@ zend_module_entry php_gettext_module_entry = { STANDARD_MODULE_HEADER, "gettext", - php_gettext_functions, + ext_functions, NULL, NULL, NULL, @@ -96,7 +70,7 @@ PHP_MINFO_FUNCTION(php_gettext) /* {{{ proto string textdomain(string domain) Set the textdomain to "domain". Returns the current domain */ -PHP_NAMED_FUNCTION(zif_textdomain) +PHP_FUNCTION(textdomain) { char *domain = NULL, *domain_name, *retval; size_t domain_len = 0; @@ -121,7 +95,7 @@ PHP_NAMED_FUNCTION(zif_textdomain) /* {{{ proto string gettext(string msgid) Return the translation of msgid for the current domain, or msgid unaltered if a translation does not exist */ -PHP_NAMED_FUNCTION(zif_gettext) +PHP_FUNCTION(gettext) { char *msgstr; zend_string *msgid; @@ -143,7 +117,7 @@ PHP_NAMED_FUNCTION(zif_gettext) /* {{{ proto string dgettext(string domain_name, string msgid) Return the translation of msgid for domain_name, or msgid unaltered if a translation does not exist */ -PHP_NAMED_FUNCTION(zif_dgettext) +PHP_FUNCTION(dgettext) { char *msgstr; zend_string *domain, *msgid; @@ -167,7 +141,7 @@ PHP_NAMED_FUNCTION(zif_dgettext) /* {{{ proto string dcgettext(string domain_name, string msgid, int category) Return the translation of msgid for domain_name and category, or msgid unaltered if a translation does not exist */ -PHP_NAMED_FUNCTION(zif_dcgettext) +PHP_FUNCTION(dcgettext) { char *msgstr; zend_string *domain, *msgid; @@ -192,7 +166,7 @@ PHP_NAMED_FUNCTION(zif_dcgettext) /* {{{ proto string bindtextdomain(string domain_name, string dir) Bind to the text domain domain_name, looking for translations in dir. Returns the current domain */ -PHP_NAMED_FUNCTION(zif_bindtextdomain) +PHP_FUNCTION(bindtextdomain) { char *domain, *dir; size_t domain_len, dir_len; @@ -226,7 +200,7 @@ PHP_NAMED_FUNCTION(zif_bindtextdomain) #if HAVE_NGETTEXT /* {{{ proto string ngettext(string MSGID1, string MSGID2, int N) Plural version of gettext() */ -PHP_NAMED_FUNCTION(zif_ngettext) +PHP_FUNCTION(ngettext) { char *msgid1, *msgid2, *msgstr; size_t msgid1_len, msgid2_len; @@ -250,7 +224,7 @@ PHP_NAMED_FUNCTION(zif_ngettext) #if HAVE_DNGETTEXT /* {{{ proto string dngettext(string domain, string msgid1, string msgid2, int count) Plural version of dgettext() */ -PHP_NAMED_FUNCTION(zif_dngettext) +PHP_FUNCTION(dngettext) { char *domain, *msgid1, *msgid2, *msgstr = NULL; size_t domain_len, msgid1_len, msgid2_len; @@ -276,7 +250,7 @@ PHP_NAMED_FUNCTION(zif_dngettext) #if HAVE_DCNGETTEXT /* {{{ proto string dcngettext(string domain, string msgid1, string msgid2, int n, int category) Plural version of dcgettext() */ -PHP_NAMED_FUNCTION(zif_dcngettext) +PHP_FUNCTION(dcngettext) { char *domain, *msgid1, *msgid2, *msgstr = NULL; size_t domain_len, msgid1_len, msgid2_len; @@ -305,7 +279,7 @@ PHP_NAMED_FUNCTION(zif_dcngettext) /* {{{ proto string bind_textdomain_codeset(string domain, string codeset) Specify the character encoding in which the messages from the DOMAIN message catalog will be returned. */ -PHP_NAMED_FUNCTION(zif_bind_textdomain_codeset) +PHP_FUNCTION(bind_textdomain_codeset) { char *domain, *codeset, *retval = NULL; size_t domain_len, codeset_len; diff --git a/ext/gettext/gettext.stub.php b/ext/gettext/gettext.stub.php index 16315f0033051..71c7712001cfb 100644 --- a/ext/gettext/gettext.stub.php +++ b/ext/gettext/gettext.stub.php @@ -1,9 +1,14 @@ static PHP_MINFO_FUNCTION(json); -static PHP_FUNCTION(json_encode); -static PHP_FUNCTION(json_decode); -static PHP_FUNCTION(json_last_error); -static PHP_FUNCTION(json_last_error_msg); PHP_JSON_API zend_class_entry *php_json_serializable_ce; PHP_JSON_API zend_class_entry *php_json_exception_ce; PHP_JSON_API ZEND_DECLARE_MODULE_GLOBALS(json) -/* {{{ json_functions[] */ -static const zend_function_entry json_functions[] = { - PHP_FE(json_encode, arginfo_json_encode) - PHP_FE(json_decode, arginfo_json_decode) - PHP_FE(json_last_error, arginfo_json_last_error) - PHP_FE(json_last_error_msg, arginfo_json_last_error_msg) - PHP_FE_END -}; -/* }}} */ - /* {{{ JsonSerializable methods */ static const zend_function_entry json_serializable_interface[] = { PHP_ABSTRACT_ME(JsonSerializable, jsonSerialize, arginfo_class_JsonSerializable_jsonSerialize) @@ -132,7 +118,7 @@ static PHP_GINIT_FUNCTION(json) zend_module_entry json_module_entry = { STANDARD_MODULE_HEADER, "json", - json_functions, + ext_functions, PHP_MINIT(json), NULL, NULL, @@ -239,7 +225,7 @@ PHP_JSON_API int php_json_decode_ex(zval *return_value, char *str, size_t str_le /* {{{ proto string json_encode(mixed data [, int options[, int depth]]) Returns the JSON representation of a value */ -static PHP_FUNCTION(json_encode) +PHP_FUNCTION(json_encode) { zval *parameter; php_json_encoder encoder; @@ -282,7 +268,7 @@ static PHP_FUNCTION(json_encode) /* {{{ proto mixed json_decode(string json [, bool assoc [, int depth]]) Decodes the JSON representation into a PHP value */ -static PHP_FUNCTION(json_decode) +PHP_FUNCTION(json_decode) { char *str; size_t str_len; @@ -337,7 +323,7 @@ static PHP_FUNCTION(json_decode) /* {{{ proto int json_last_error() Returns the error code of the last json_encode() or json_decode() call. */ -static PHP_FUNCTION(json_last_error) +PHP_FUNCTION(json_last_error) { ZEND_PARSE_PARAMETERS_NONE(); @@ -347,7 +333,7 @@ static PHP_FUNCTION(json_last_error) /* {{{ proto string json_last_error_msg() Returns the error string of the last json_encode() or json_decode() call. */ -static PHP_FUNCTION(json_last_error_msg) +PHP_FUNCTION(json_last_error_msg) { ZEND_PARSE_PARAMETERS_NONE(); diff --git a/ext/json/json.stub.php b/ext/json/json.stub.php index c5713a7980d40..406bd8a87c869 100644 --- a/ext/json/json.stub.php +++ b/ext/json/json.stub.php @@ -1,5 +1,7 @@