helly Wed Dec 31 13:25:05 2008 UTC Modified files: /ZendEngine2 zend_builtin_functions.c /php-src/main main.c Log: - Register engine classes when and where they should be - Show core module version as PHP version http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_builtin_functions.c?r1=1.395&r2=1.396&diff_format=u Index: ZendEngine2/zend_builtin_functions.c diff -u ZendEngine2/zend_builtin_functions.c:1.395 ZendEngine2/zend_builtin_functions.c:1.396 --- ZendEngine2/zend_builtin_functions.c:1.395 Wed Dec 31 12:24:56 2008 +++ ZendEngine2/zend_builtin_functions.c Wed Dec 31 13:25:05 2008 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_builtin_functions.c,v 1.395 2008/12/31 12:24:56 helly Exp $ */ +/* $Id: zend_builtin_functions.c,v 1.396 2008/12/31 13:25:05 helly Exp $ */ #include "zend.h" #include "zend_API.h" @@ -297,6 +297,8 @@ INIT_CLASS_ENTRY(class_entry, "stdClass", NULL); zend_standard_class_def = zend_register_internal_class(&class_entry TSRMLS_CC); + zend_register_default_classes(TSRMLS_C); + return SUCCESS; } /* }}} */ http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.786&r2=1.787&diff_format=u Index: php-src/main/main.c diff -u php-src/main/main.c:1.786 php-src/main/main.c:1.787 --- php-src/main/main.c:1.786 Wed Dec 31 11:12:38 2008 +++ php-src/main/main.c Wed Dec 31 13:25:05 2008 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: main.c,v 1.786 2008/12/31 11:12:38 sebastian Exp $ */ +/* $Id: main.c,v 1.787 2008/12/31 13:25:05 helly Exp $ */ /* {{{ includes */ @@ -1717,6 +1717,14 @@ } /* }}} */ +PHP_MINFO_FUNCTION(php_core) { /* {{{ */ + php_info_print_table_start(); + php_info_print_table_row(2, "PHP Version", PHP_VERSION); + php_info_print_table_end(); + DISPLAY_INI_ENTRIES(); +} +/* }}} */ + /* {{{ php_register_extensions */ int php_register_extensions(zend_module_entry **ptr, int count TSRMLS_DC) @@ -1774,6 +1782,7 @@ zend_utility_values zuv; int module_number=0; /* for REGISTER_INI_ENTRIES() */ char *php_os; + zend_module_entry *module; #ifdef ZTS zend_executor_globals *executor_globals; void ***tsrm_ls; @@ -1998,9 +2007,6 @@ return FAILURE; } - /* Register internal Zend classes */ - zend_register_default_classes(TSRMLS_C); - /* startup extensions staticly compiled in */ if (php_register_internal_extensions_func(TSRMLS_C) == FAILURE) { php_printf("Unable to start builtin modules\n"); @@ -2029,14 +2035,18 @@ /* register additional functions */ if (sapi_module.additional_functions) { - zend_module_entry *module; - if (zend_hash_find(&module_registry, "standard", sizeof("standard"), (void**)&module)==SUCCESS) { EG(current_module) = module; zend_register_functions(NULL, sapi_module.additional_functions, NULL, MODULE_PERSISTENT TSRMLS_CC); EG(current_module) = NULL; } } + + /* make core report what it should */ + if (zend_hash_find(&module_registry, "core", sizeof("core"), (void**)&module)==SUCCESS) { + module->version = PHP_VERSION; + module->info_func = PHP_MINFO(php_core); + } zend_post_startup(TSRMLS_C);
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php