From ff037203c7f8d63c9f71228efd42d32c8fd720ae Mon Sep 17 00:00:00 2001 From: Marcus Boerger Date: Tue, 30 Dec 2008 18:17:44 +0000 Subject: [PATCH] MFH Use a module struct for the built-in functions --- Zend/zend_builtin_functions.c | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index 3a35373f75..2180f582a5 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -218,7 +218,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_extension_loaded, 0, 0, 1) ZEND_END_ARG_INFO() /* }}} */ -static const zend_function_entry builtin_functions[] = { +static const zend_function_entry builtin_functions[] = { /* {{{ */ ZEND_FE(zend_version, arginfo_zend__void) ZEND_FE(func_num_args, arginfo_zend__void) ZEND_FE(func_get_arg, arginfo_func_get_arg) @@ -284,13 +284,27 @@ static const zend_function_entry builtin_functions[] = { ZEND_FE(gc_disable, arginfo_zend__void) { NULL, NULL, NULL } }; +/* }}} */ +zend_module_entry zend_builtin_module = { /* {{{ */ + STANDARD_MODULE_HEADER, + "Zend", + builtin_functions, + NULL, + NULL, + NULL, + NULL, + NULL, + ZEND_VERSION, + STANDARD_MODULE_PROPERTIES +}; +/* }}} */ -int zend_startup_builtin_functions(TSRMLS_D) +int zend_startup_builtin_functions(TSRMLS_D) /* {{{ */ { - return zend_register_functions(NULL, builtin_functions, NULL, MODULE_PERSISTENT TSRMLS_CC); + return zend_register_internal_module(&zend_builtin_module TSRMLS_CC) == NULL ? FAILURE : SUCCESS; } - +/* }}} */ /* {{{ proto string zend_version(void) Get the version of the Zend Engine */ -- 2.40.0