summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2008-12-30 20:14:58 +0000
committerMarcus Boerger <helly@php.net>2008-12-30 20:14:58 +0000
commit16e60294d8bde8e4392b47267951190a31c2eeb9 (patch)
treee4edf9e4ab5a23e4787ed48cc638540fbe3305ee
parent65ec64a825d8bb78eca7ccce9fdb70fe58106b10 (diff)
downloadphp-git-16e60294d8bde8e4392b47267951190a31c2eeb9.tar.gz
- Provide a core module that contains all Zend and php/main stuff but stdClass
-rw-r--r--Zend/zend.c2
-rw-r--r--Zend/zend_builtin_functions.c6
2 files changed, 6 insertions, 2 deletions
diff --git a/Zend/zend.c b/Zend/zend.c
index 3480eaf386..1f4f610f4f 100644
--- a/Zend/zend.c
+++ b/Zend/zend.c
@@ -684,6 +684,7 @@ static void register_standard_class(TSRMLS_D) /* {{{ */
zend_initialize_class_data(zend_standard_class_def, 1 TSRMLS_CC);
zend_hash_add(CG(class_table), "stdclass", sizeof("stdclass"), &zend_standard_class_def, sizeof(zend_class_entry *), NULL);
+ zend_standard_class_def->module = EG(current_module);
}
/* }}} */
@@ -1159,6 +1160,7 @@ int zend_startup(zend_utility_functions *utility_functions, char **extensions TS
EG(user_error_handler) = NULL;
EG(user_exception_handler) = NULL;
#endif
+
register_standard_class(TSRMLS_C);
zend_register_standard_constants(TSRMLS_C);
zend_register_auto_global("GLOBALS", sizeof("GLOBALS") - 1, NULL TSRMLS_CC);
diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c
index 4ceccee11e..65d3804b4b 100644
--- a/Zend/zend_builtin_functions.c
+++ b/Zend/zend_builtin_functions.c
@@ -293,7 +293,7 @@ static const zend_function_entry builtin_functions[] = { /* {{{ */
zend_module_entry zend_builtin_module = { /* {{{ */
STANDARD_MODULE_HEADER,
- "Zend",
+ "Core",
builtin_functions,
NULL,
NULL,
@@ -307,7 +307,9 @@ zend_module_entry zend_builtin_module = { /* {{{ */
int zend_startup_builtin_functions(TSRMLS_D) /* {{{ */
{
- return zend_register_internal_module(&zend_builtin_module TSRMLS_CC) == NULL ? FAILURE : SUCCESS;
+ zend_builtin_module.module_number = 0;
+ zend_builtin_module.type = MODULE_PERSISTENT;
+ return (EG(current_module) = zend_register_module_ex(&zend_builtin_module TSRMLS_CC)) == NULL ? FAILURE : SUCCESS;
}
/* }}} */