cvs: php-src(PHP_5_1) / NEWS /main php_variables.c

From: Date: Fri, 17 Mar 2006 08:58:51 +0000
Subject: cvs: php-src(PHP_5_1) / NEWS /main php_variables.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-37307@lists.php.net to get a copy of this message
dmitry Fri Mar 17 08:58:51 2006 UTC Modified files: (Branch: PHP_5_1) /php-src NEWS /php-src/main php_variables.c Log: Allowed 'auto_globals_jit' work together with 'register_argc_argv' http://cvs.php.net/viewcvs.cgi/php-src/NEWS?r1=1.2027.2.463&r2=1.2027.2.464&diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.463 php-src/NEWS:1.2027.2.464 --- php-src/NEWS:1.2027.2.463 Wed Mar 15 16:13:18 2006 +++ php-src/NEWS Fri Mar 17 08:58:51 2006 @@ -1,6 +1,7 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? Mar 2006, PHP 5.1.3RC2 +- Allowed 'auto_globals_jit' work together with 'register_argc_argv'. (Dmitry) - Eliminated run-time constant fetching for TRUE, FALSE and NULL. (Dmitry) - Fixed offset/length parameter validation in substr_compare() function. (Ilia) - Added overflow checks to wordwrap() function. (Ilia) http://cvs.php.net/viewcvs.cgi/php-src/main/php_variables.c?r1=1.104.2.5&r2=1.104.2.6&diff_format=u Index: php-src/main/php_variables.c diff -u php-src/main/php_variables.c:1.104.2.5 php-src/main/php_variables.c:1.104.2.6 --- php-src/main/php_variables.c:1.104.2.5 Mon Feb 13 12:18:16 2006 +++ php-src/main/php_variables.c Fri Mar 17 08:58:51 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_variables.c,v 1.104.2.5 2006/02/13 12:18:16 dmitry Exp $ */ +/* $Id: php_variables.c,v 1.104.2.6 2006/03/17 08:58:51 dmitry Exp $ */ #include <stdio.h> #include "php.h" @@ -423,8 +423,7 @@ int count = 0; char *ss, *space; - if (! (PG(register_globals) || SG(request_info).argc || - PG(http_globals)[TRACK_VARS_SERVER]) ) { + if (!(PG(register_globals) || SG(request_info).argc || track_vars_array)) { return; } @@ -614,7 +613,7 @@ unsigned char _gpc_flags[5] = {0, 0, 0, 0, 0}; zval *dummy_track_vars_array = NULL; zend_bool initialized_dummy_track_vars_array=0; - zend_bool jit_initialization = (PG(auto_globals_jit) && !PG(register_globals) && !PG(register_long_arrays) && !PG(register_argc_argv)); + zend_bool jit_initialization = (PG(auto_globals_jit) && !PG(register_globals) && !PG(register_long_arrays)); struct auto_global_record { char *name; uint name_len; @@ -756,6 +755,18 @@ PG(http_globals)[TRACK_VARS_SERVER]->refcount++; } + if (PG(register_argc_argv)) { + zval **argc, **argv; + + if (zend_hash_find(&EG(symbol_table), "argc", sizeof("argc"), (void**)&argc) == SUCCESS && + zend_hash_find(&EG(symbol_table), "argv", sizeof("argv"), (void**)&argv) == SUCCESS) { + (*argc)->refcount++; + (*argv)->refcount++; + zend_hash_update(Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_SERVER]), "argv", sizeof("argv"), argv, sizeof(zval *), NULL); + zend_hash_update(Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_SERVER]), "argc", sizeof("argc"), argc, sizeof(zval *), NULL); + } + } + return 0; /* don't rearm */ }

« previous php.cvs (#37307) next »