com php-src: Drop dead code from update_constant: Zend/ze nd_execute_API.c
| From: | Nikita Popov | Date: | Fri, 29 Apr 2016 20:15:38 +0000 |
| Subject: | com php-src: Drop dead code from update_constant: Zend/ze nd_execute_API.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-91975@lists.php.net to get a copy of this message | ||
Commit: d048837a46ca9505fcfd13e6c5c1268e43d5eb4a
Author: Nikita Popov <nikic@php.net> Fri, 29 Apr 2016 22:15:38 +0200
Parents: 5595dd5ffa3453f22c0508052417d3b2853f5015
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=d048837a46ca9505fcfd13e6c5c1268e43d5eb4a
Log:
Drop dead code from update_constant
Changed paths:
M Zend/zend_execute_API.c
Diff:
diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c
index 2acf29c..794c7f0 100644
--- a/Zend/zend_execute_API.c
+++ b/Zend/zend_execute_API.c
@@ -608,21 +608,8 @@ ZEND_API int zval_update_constant_ex(zval *p, zend_class_entry *scope) /* {{{
*/
Z_TYPE_FLAGS_P(p) = IS_TYPE_REFCOUNTED | IS_TYPE_COPYABLE;
}
}
- if (actual[0] == '\\') {
- if (inline_change) {
- memmove(Z_STRVAL_P(p), Z_STRVAL_P(p)+1, Z_STRLEN_P(p));
- --Z_STRLEN_P(p);
- } else {
- ++actual;
- }
- --actual_len;
- }
if ((Z_CONST_FLAGS_P(p) & IS_CONSTANT_UNQUALIFIED) == 0) {
- if (ZSTR_VAL(save)[0] == '\\') {
- zend_throw_error(NULL, "Undefined constant '%s'", ZSTR_VAL(save) + 1);
- } else {
- zend_throw_error(NULL, "Undefined constant '%s'", ZSTR_VAL(save));
- }
+ zend_throw_error(NULL, "Undefined constant '%s'", ZSTR_VAL(save));
if (inline_change) {
zend_string_release(save);
}