cvs: ZendEngine2(PHP_5_1) / zend_API.c
| From: | Antony Dovgal | Date: | Wed, 23 Nov 2005 18:51:47 +0000 |
| Subject: | cvs: ZendEngine2(PHP_5_1) / zend_API.c | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-4385@lists.php.net to get a copy of this message | ||
tony2001 Wed Nov 23 13:51:47 2005 EDT
Modified files: (Branch: PHP_5_1)
/ZendEngine2 zend_API.c
Log:
change zend_read_property() to allocate property zval too
http://cvs.php.net/diff.php/ZendEngine2/zend_API.c?r1=1.296.2.11&r2=1.296.2.12&ty=u
Index: ZendEngine2/zend_API.c
diff -u ZendEngine2/zend_API.c:1.296.2.11 ZendEngine2/zend_API.c:1.296.2.12
--- ZendEngine2/zend_API.c:1.296.2.11 Wed Nov 23 06:15:10 2005
+++ ZendEngine2/zend_API.c Wed Nov 23 13:51:44 2005
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_API.c,v 1.296.2.11 2005/11/23 11:15:10 tony2001 Exp $ */
+/* $Id: zend_API.c,v 1.296.2.12 2005/11/23 18:51:44 tony2001 Exp $ */
#include "zend.h"
#include "zend_execute.h"
@@ -2612,7 +2612,7 @@
ZEND_API zval *zend_read_property(zend_class_entry *scope, zval *object, char *name, int
name_length, zend_bool silent TSRMLS_DC)
{
- zval property, *value;
+ zval *property, *value;
zend_class_entry *old_scope = EG(scope);
EG(scope) = scope;
@@ -2624,9 +2624,10 @@
zend_get_object_classname(object, &class_name, &class_name_len TSRMLS_CC);
zend_error(E_CORE_ERROR, "Property %s of class %s cannot be read", name, class_name);
}
- ZVAL_STRINGL(&property, name, name_length, 0);
- value = Z_OBJ_HT_P(object)->read_property(object, &property, silent TSRMLS_CC);
-
+ MAKE_STD_ZVAL(property);
+ ZVAL_STRINGL(property, name, name_length, 1);
+ value = Z_OBJ_HT_P(object)->read_property(object, property, silent TSRMLS_CC);
+ zval_ptr_dtor(&property);
EG(scope) = old_scope;
return value;
}