Use a module struct for the built-in functions

This commit is contained in:
Marcus Boerger 2008-12-30 18:17:28 +00:00
parent 4d3f948495
commit 6e29350fb8
3 changed files with 14 additions and 8 deletions

View File

@ -1243,7 +1243,6 @@ void zend_shutdown(TSRMLS_D) /* {{{ */
#endif
zend_destroy_rsrc_list(&EG(persistent_list) TSRMLS_CC);
zend_hash_graceful_reverse_destroy(&module_registry);
zend_shutdown_builtin_functions(TSRMLS_C);
zend_hash_destroy(GLOBAL_FUNCTION_TABLE);
zend_hash_destroy(GLOBAL_CLASS_TABLE);

View File

@ -291,15 +291,23 @@ static const zend_function_entry builtin_functions[] = { /* {{{ */
};
/* }}} */
int zend_startup_builtin_functions(TSRMLS_D) /* {{{ */
{
return zend_register_functions(NULL, builtin_functions, NULL, MODULE_PERSISTENT TSRMLS_CC);
}
zend_module_entry zend_builtin_module = { /* {{{ */
STANDARD_MODULE_HEADER,
"Zend",
builtin_functions,
NULL,
NULL,
NULL,
NULL,
NULL,
ZEND_VERSION,
STANDARD_MODULE_PROPERTIES
};
/* }}} */
void zend_shutdown_builtin_functions(TSRMLS_D) /* {{{ */
int zend_startup_builtin_functions(TSRMLS_D) /* {{{ */
{
zend_unregister_functions(builtin_functions, -1, NULL TSRMLS_CC);
return zend_register_internal_module(&zend_builtin_module TSRMLS_CC) == NULL ? FAILURE : SUCCESS;
}
/* }}} */

View File

@ -23,7 +23,6 @@
#define ZEND_BUILTIN_FUNCTIONS_H
int zend_startup_builtin_functions(TSRMLS_D);
void zend_shutdown_builtin_functions(TSRMLS_D);
BEGIN_EXTERN_C()
ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last, int provide_object TSRMLS_DC);