cvs: ZendEngine2 / zend_compile.c

From: Date: Sun, 23 Mar 2003 08:14:41 +0000
Subject: cvs: ZendEngine2 / zend_compile.c
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-1066@lists.php.net to get a copy of this message
zeev Sun Mar 23 03:14:41 2003 EDT Modified files: /ZendEngine2 zend_compile.c Log: Another fix for implicit public, perhaps it was not such a good idea :I Index: ZendEngine2/zend_compile.c diff -u ZendEngine2/zend_compile.c:1.397 ZendEngine2/zend_compile.c:1.398 --- ZendEngine2/zend_compile.c:1.397 Wed Mar 19 16:17:47 2003 +++ ZendEngine2/zend_compile.c Sun Mar 23 03:14:41 2003 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_compile.c,v 1.397 2003/03/19 21:17:47 andrei Exp $ */ +/* $Id: zend_compile.c,v 1.398 2003/03/23 08:14:41 zeev Exp $ */ #include "zend_language_parser.h" #include "zend.h" @@ -1698,6 +1698,13 @@ if ((child_info->flags & ZEND_ACC_PPP_MASK) > (parent_info->flags & ZEND_ACC_PPP_MASK)) { zend_error(E_COMPILE_ERROR, "Access level to %s::$%s must be %s (as in class %s)%s", ce->name, hash_key->arKey, zend_visibility_string(parent_info->flags), parent_ce->name, (parent_info->flags&ZEND_ACC_PUBLIC) ? "" : " or weaker"); } else if (child_info->flags & ZEND_ACC_IMPLICIT_PUBLIC) { + /* Explicitly copy the value from the parent */ + zval **pvalue; + + if (zend_hash_quick_find(&parent_ce->default_properties, hash_key->arKey, hash_key->nKeyLength, hash_key->h, (void **) &pvalue)==SUCCESS) { + zend_hash_quick_update(&ce->default_properties, hash_key->arKey, hash_key->nKeyLength, hash_key->h, pvalue, sizeof(zval *), NULL); + (*pvalue)->refcount++; + } return 1; /* Inherit from the parent */ } return 0; /* Don't copy from parent */

« previous php.zend-engine.cvs (#1066) next »