summaryrefslogtreecommitdiff
path: root/Zend/zend_API.c
diff options
context:
space:
mode:
authorGeorge Wang <gwang@php.net>2014-11-03 11:44:13 -0500
committerGeorge Wang <gwang@php.net>2014-11-03 11:44:13 -0500
commitbba11e32557c59e5d73a67c3f8770ecd2dcd9926 (patch)
tree9791f6cee83a5497e82216b82c413a1794a53a31 /Zend/zend_API.c
parent4435161456740f8709fe0d5592bc195bb5be04ba (diff)
parente12d69df0c013bf94b18136fe877f9af2ba15c02 (diff)
downloadphp-git-bba11e32557c59e5d73a67c3f8770ecd2dcd9926.tar.gz
Merge branch 'PHP-5.6' of git.php.net:php-src into PHP-5.6
Diffstat (limited to 'Zend/zend_API.c')
-rw-r--r--Zend/zend_API.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/Zend/zend_API.c b/Zend/zend_API.c
index b8dd3434ca..a465721f1f 100644
--- a/Zend/zend_API.c
+++ b/Zend/zend_API.c
@@ -2499,7 +2499,7 @@ ZEND_API void zend_post_deactivate_modules(TSRMLS_D) /* {{{ */
/* }}} */
/* return the next free module number */
-int zend_next_free_module(void) /* {{{ */
+ZEND_API int zend_next_free_module(void) /* {{{ */
{
return zend_hash_num_elements(&module_registry) + 1;
}
@@ -2635,18 +2635,15 @@ ZEND_API ZEND_FUNCTION(display_disabled_function)
}
/* }}} */
-static zend_function_entry disabled_function[] = {
- ZEND_FE(display_disabled_function, NULL)
- ZEND_FE_END
-};
-
ZEND_API int zend_disable_function(char *function_name, uint function_name_length TSRMLS_DC) /* {{{ */
{
- if (zend_hash_del(CG(function_table), function_name, function_name_length+1)==FAILURE) {
- return FAILURE;
+ zend_internal_function *func;
+ if (zend_hash_find(CG(function_table), function_name, function_name_length+1, (void **)&func)==SUCCESS) {
+ func->arg_info = NULL;
+ func->handler = ZEND_FN(display_disabled_function);
+ return SUCCESS;
}
- disabled_function[0].fname = function_name;
- return zend_register_functions(NULL, disabled_function, CG(function_table), MODULE_PERSISTENT TSRMLS_CC);
+ return FAILURE;
}
/* }}} */