pajoye Wed, 19 Jan 2011 17:06:50 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=307590
Log:
- avoid local redeclaration
Changed paths:
U php/php-src/branches/PHP_5_3/Zend/zend_compile.c
U php/php-src/trunk/Zend/zend_compile.c
Modified: php/php-src/branches/PHP_5_3/Zend/zend_compile.c
===================================================================
--- php/php-src/branches/PHP_5_3/Zend/zend_compile.c 2011-01-19 16:41:50 UTC
(rev 307589)
+++ php/php-src/branches/PHP_5_3/Zend/zend_compile.c 2011-01-19 17:06:50 UTC
(rev 307590)
@@ -5220,13 +5220,13 @@
c_ns_name[Z_STRLEN_P(CG(current_namespace))] = '\\';
memcpy(c_ns_name+Z_STRLEN_P(CG(current_namespace))+1, lcname,
Z_STRLEN_P(name)+1);
if (zend_hash_exists(CG(class_table), c_ns_name,
Z_STRLEN_P(CG(current_namespace)) + 1 + Z_STRLEN_P(name)+1)) {
- char *tmp = zend_str_tolower_dup(Z_STRVAL_P(ns),
Z_STRLEN_P(ns));
+ char *tmp2 = zend_str_tolower_dup(Z_STRVAL_P(ns),
Z_STRLEN_P(ns));
if (Z_STRLEN_P(ns) != Z_STRLEN_P(CG(current_namespace))
+ 1 + Z_STRLEN_P(name) ||
- memcmp(tmp, c_ns_name, Z_STRLEN_P(ns))) {
+ memcmp(tmp2, c_ns_name, Z_STRLEN_P(ns))) {
zend_error(E_COMPILE_ERROR, "Cannot use %s as
%s because the name is already in use", Z_STRVAL_P(ns), Z_STRVAL_P(name));
}
- efree(tmp);
+ efree(tmp2);
}
efree(c_ns_name);
} else if (zend_hash_find(CG(class_table), lcname, Z_STRLEN_P(name)+1,
(void**)&pce) == SUCCESS &&
Modified: php/php-src/trunk/Zend/zend_compile.c
===================================================================
--- php/php-src/trunk/Zend/zend_compile.c 2011-01-19 16:41:50 UTC (rev
307589)
+++ php/php-src/trunk/Zend/zend_compile.c 2011-01-19 17:06:50 UTC (rev
307590)
@@ -6540,13 +6540,13 @@
c_ns_name[Z_STRLEN_P(CG(current_namespace))] = '\\';
memcpy(c_ns_name+Z_STRLEN_P(CG(current_namespace))+1, lcname,
Z_STRLEN_P(name)+1);
if (zend_hash_exists(CG(class_table), c_ns_name,
Z_STRLEN_P(CG(current_namespace)) + 1 + Z_STRLEN_P(name)+1)) {
- char *tmp = zend_str_tolower_dup(Z_STRVAL_P(ns),
Z_STRLEN_P(ns));
+ char *tmp2 = zend_str_tolower_dup(Z_STRVAL_P(ns),
Z_STRLEN_P(ns));
if (Z_STRLEN_P(ns) != Z_STRLEN_P(CG(current_namespace))
+ 1 + Z_STRLEN_P(name) ||
- memcmp(tmp, c_ns_name, Z_STRLEN_P(ns))) {
+ memcmp(tmp2, c_ns_name, Z_STRLEN_P(ns))) {
zend_error(E_COMPILE_ERROR, "Cannot use %s as
%s because the name is already in use", Z_STRVAL_P(ns), Z_STRVAL_P(name));
}
- efree(tmp);
+ efree(tmp2);
}
efree(c_ns_name);
} else if (zend_hash_find(CG(class_table), lcname, Z_STRLEN_P(name)+1,
(void**)&pce) == SUCCESS &&
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php