dmitry Fri Nov 10 12:02:10 2006 UTC Modified files: (Branch: PHP_5_2) /php-src NEWS /php-src/ext/bcmath bcmath.c php_bcmath.h Log: Intialization code is moved from request startup to module startup http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.349&r2=1.2027.2.547.2.350&diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.349 php-src/NEWS:1.2027.2.547.2.350 --- php-src/NEWS:1.2027.2.547.2.349 Fri Nov 10 11:49:35 2006 +++ php-src/NEWS Fri Nov 10 12:02:09 2006 @@ -9,6 +9,8 @@ In case of modification of corresponding registry-tree PHP will reload it automatic . start timiout thread only if necessary +- ext/bcmath intialization code is moved from request startup to module + startup. (Dmitry) - Zend Memory Manager Improvements (Dmitry) . use HeapAlloc() instead of VirtualAlloc() . use "win32" storage manager (instead of "malloc") on Windows by default http://cvs.php.net/viewvc.cgi/php-src/ext/bcmath/bcmath.c?r1=1.62.2.2.2.3&r2=1.62.2.2.2.4&diff_format=u Index: php-src/ext/bcmath/bcmath.c diff -u php-src/ext/bcmath/bcmath.c:1.62.2.2.2.3 php-src/ext/bcmath/bcmath.c:1.62.2.2.2.4 --- php-src/ext/bcmath/bcmath.c:1.62.2.2.2.3 Fri Nov 3 14:46:48 2006 +++ php-src/ext/bcmath/bcmath.c Fri Nov 10 12:02:10 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: bcmath.c,v 1.62.2.2.2.3 2006/11/03 14:46:48 bjori Exp $ */ +/* $Id: bcmath.c,v 1.62.2.2.2.4 2006/11/10 12:02:10 dmitry Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -33,6 +33,7 @@ ZEND_DECLARE_MODULE_GLOBALS(bcmath); static PHP_GINIT_FUNCTION(bcmath); +static PHP_GSHUTDOWN_FUNCTION(bcmath); /* {{{ arginfo */ static @@ -124,13 +125,13 @@ bcmath_functions, PHP_MINIT(bcmath), PHP_MSHUTDOWN(bcmath), - PHP_RINIT(bcmath), - PHP_RSHUTDOWN(bcmath), + NULL, + NULL, PHP_MINFO(bcmath), NO_VERSION_YET, PHP_MODULE_GLOBALS(bcmath), PHP_GINIT(bcmath), - NULL, + PHP_GSHUTDOWN(bcmath), NULL, STANDARD_MODULE_PROPERTIES_EX }; @@ -150,6 +151,17 @@ static PHP_GINIT_FUNCTION(bcmath) { bcmath_globals->bc_precision = 0; + bc_init_numbers(TSRMLS_C); +} +/* }}} */ + +/* {{{ PHP_GSHUTDOWN_FUNCTION + */ +static PHP_GSHUTDOWN_FUNCTION(bcmath) +{ + _bc_free_num_ex(&bcmath_globals->_zero_, 1); + _bc_free_num_ex(&bcmath_globals->_one_, 1); + _bc_free_num_ex(&bcmath_globals->_two_, 1); } /* }}} */ @@ -173,28 +185,6 @@ } /* }}} */ -/* {{{ PHP_RINIT_FUNCTION - */ -PHP_RINIT_FUNCTION(bcmath) -{ - bc_init_numbers(TSRMLS_C); - - return SUCCESS; -} -/* }}} */ - -/* {{{ PHP_RSHUTDOWN_FUNCTION - */ -PHP_RSHUTDOWN_FUNCTION(bcmath) -{ - _bc_free_num_ex(&BCG(_zero_), 1); - _bc_free_num_ex(&BCG(_one_), 1); - _bc_free_num_ex(&BCG(_two_), 1); - - return SUCCESS; -} -/* }}} */ - /* {{{ PHP_MINFO_FUNCTION */ PHP_MINFO_FUNCTION(bcmath) http://cvs.php.net/viewvc.cgi/php-src/ext/bcmath/php_bcmath.h?r1=1.20.2.1&r2=1.20.2.1.2.1&diff_format=u Index: php-src/ext/bcmath/php_bcmath.h diff -u php-src/ext/bcmath/php_bcmath.h:1.20.2.1 php-src/ext/bcmath/php_bcmath.h:1.20.2.1.2.1 --- php-src/ext/bcmath/php_bcmath.h:1.20.2.1 Sun Jan 1 12:50:00 2006 +++ php-src/ext/bcmath/php_bcmath.h Fri Nov 10 12:02:10 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_bcmath.h,v 1.20.2.1 2006/01/01 12:50:00 sniper Exp $ */ +/* $Id: php_bcmath.h,v 1.20.2.1.2.1 2006/11/10 12:02:10 dmitry Exp $ */ #ifndef PHP_BCMATH_H #define PHP_BCMATH_H @@ -30,8 +30,6 @@ PHP_MINIT_FUNCTION(bcmath); PHP_MSHUTDOWN_FUNCTION(bcmath); -PHP_RINIT_FUNCTION(bcmath); -PHP_RSHUTDOWN_FUNCTION(bcmath); PHP_MINFO_FUNCTION(bcmath); PHP_FUNCTION(bcadd);
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php