cvs: ZendEngine2 / zend_API.c
| From: | Marcus Boerger | Date: | Tue, 02 Sep 2003 20:49:42 +0000 |
| Subject: | cvs: ZendEngine2 / zend_API.c | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-1795@lists.php.net to get a copy of this message | ||
helly Tue Sep 2 16:49:42 2003 EDT
Modified files:
/ZendEngine2 zend_API.c
Log:
Allow redeclaring of protected properties as public (for internal classes).
# See http://news.php.net/article.php?group=php.zend-engine.cvs&article=1737
# for the part not fixed (e.g. property redeclaration of userland classes)
Index: ZendEngine2/zend_API.c
diff -u ZendEngine2/zend_API.c:1.213 ZendEngine2/zend_API.c:1.214
--- ZendEngine2/zend_API.c:1.213 Tue Sep 2 09:26:25 2003
+++ ZendEngine2/zend_API.c Tue Sep 2 16:49:42 2003
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_API.c,v 1.213 2003/09/02 13:26:25 helly Exp $ */
+/* $Id: zend_API.c,v 1.214 2003/09/02 20:49:42 helly Exp $ */
#include "zend.h"
#include "zend_execute.h"
@@ -1707,6 +1707,14 @@
}
break;
case ZEND_ACC_PUBLIC:
+ if (ce->parent) {
+ char *prot_name;
+ int prot_name_length;
+
+ mangle_property_name(&prot_name, &prot_name_length, "*", 1, name,
name_length, ce->type & ZEND_INTERNAL_CLASS);
+ zend_hash_del(target_symbol_table, prot_name, prot_name_length+1);
+ pefree(prot_name, ce->type & ZEND_INTERNAL_CLASS);
+ }
zend_hash_update(target_symbol_table, name, name_length+1, &property, sizeof(zval *), NULL);
property_info.name = ce->type & ZEND_INTERNAL_CLASS ? zend_strndup(name, name_length) :
estrndup(name, name_length);
property_info.name_length = name_length;