cvs: ZendEngine2 / zend.c zend_builtin_functions.c

[email protected] ("Marcus Boerger")
Newsgroups php.zend-engine.cvs
Message-ID <cvshelly1230726296@cvsserver>
helly		Wed Dec 31 12:24:56 2008 UTC

  Modified files:              
    /ZendEngine2	zend.c zend_builtin_functions.c 
  Log:
  - Move stdClass registering where it should be
  
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend.c?r1=1.426&r2=1.427&diff_format=u
Index: ZendEngine2/zend.c
diff -u ZendEngine2/zend.c:1.426 ZendEngine2/zend.c:1.427
--- ZendEngine2/zend.c:1.426	Wed Dec 31 11:12:28 2008
+++ ZendEngine2/zend.c	Wed Dec 31 12:24:56 2008
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend.c,v 1.426 2008/12/31 11:12:28 sebastian Exp $ */
+/* $Id: zend.c,v 1.427 2008/12/31 12:24:56 helly Exp $ */
 
 #include "zend.h"
 #include "zend_extensions.h"
@@ -674,20 +674,6 @@
 }
 /* }}} */
 
-static void register_standard_class(TSRMLS_D) /* {{{ */
-{
-	zend_standard_class_def = calloc(1, sizeof(zend_class_entry));
-
-	zend_standard_class_def->type = ZEND_INTERNAL_CLASS;
-	zend_standard_class_def->name_length = sizeof("stdClass") - 1;
-	zend_standard_class_def->name.s = zend_strndup("stdClass", zend_standard_class_def->name_length);
-	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);
-}
-/* }}} */
-
 #ifdef ZTS
 static zend_bool asp_tags_default			= 0;
 static zend_bool short_tags_default			= 1;
@@ -1161,7 +1147,6 @@
 	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);
 
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_builtin_functions.c?r1=1.394&r2=1.395&diff_format=u
Index: ZendEngine2/zend_builtin_functions.c
diff -u ZendEngine2/zend_builtin_functions.c:1.394 ZendEngine2/zend_builtin_functions.c:1.395
--- ZendEngine2/zend_builtin_functions.c:1.394	Wed Dec 31 11:12:28 2008
+++ ZendEngine2/zend_builtin_functions.c	Wed Dec 31 12:24:56 2008
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend_builtin_functions.c,v 1.394 2008/12/31 11:12:28 sebastian Exp $ */
+/* $Id: zend_builtin_functions.c,v 1.395 2008/12/31 12:24:56 helly Exp $ */
 
 #include "zend.h"
 #include "zend_API.h"
@@ -291,11 +291,21 @@
 };
 /* }}} */
 
+ZEND_MINIT_FUNCTION(core) { /* {{{ */
+	zend_class_entry class_entry;
+
+	INIT_CLASS_ENTRY(class_entry, "stdClass", NULL);
+	zend_standard_class_def = zend_register_internal_class(&class_entry TSRMLS_CC);
+
+	return SUCCESS;
+}
+/* }}} */
+
 zend_module_entry zend_builtin_module = { /* {{{ */
     STANDARD_MODULE_HEADER,
 	"Core",
 	builtin_functions,
-	NULL,
+	ZEND_MINIT(core),
 	NULL,
 	NULL,
 	NULL,
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.