cvs: ZendEngine2(PHP_5_3) / zend_builtin_functions.c

[email protected] ("Marcus Boerger")
Newsgroups php.zend-engine.cvs
Message-ID <cvshelly1230661064@cvsserver>
helly		Tue Dec 30 18:17:44 2008 UTC

  Modified files:              (Branch: PHP_5_3)
    /ZendEngine2	zend_builtin_functions.c 
  Log:
  MFH Use a module struct for the built-in functions
  
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_builtin_functions.c?r1=1.277.2.12.2.25.2.37&r2=1.277.2.12.2.25.2.38&diff_format=u
Index: ZendEngine2/zend_builtin_functions.c
diff -u ZendEngine2/zend_builtin_functions.c:1.277.2.12.2.25.2.37 ZendEngine2/zend_builtin_functions.c:1.277.2.12.2.25.2.38
--- ZendEngine2/zend_builtin_functions.c:1.277.2.12.2.25.2.37	Tue Dec  9 19:17:11 2008
+++ ZendEngine2/zend_builtin_functions.c	Tue Dec 30 18:17:44 2008
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend_builtin_functions.c,v 1.277.2.12.2.25.2.37 2008/12/09 19:17:11 johannes Exp $ */
+/* $Id: zend_builtin_functions.c,v 1.277.2.12.2.25.2.38 2008/12/30 18:17:44 helly Exp $ */
 
 #include "zend.h"
 #include "zend_API.h"
@@ -218,7 +218,7 @@
 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 @@
 	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 */
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.