diff options
-rw-r--r-- | Zend/zend_API.c | 8 | ||||
-rw-r--r-- | Zend/zend_object_handlers.c | 4 | ||||
-rw-r--r-- | Zend/zend_object_handlers.h | 2 | ||||
-rw-r--r-- | ext/reflection/php_reflection.c | 5 | ||||
-rw-r--r-- | ext/soap/php_encoding.c | 2 |
5 files changed, 9 insertions, 12 deletions
diff --git a/Zend/zend_API.c b/Zend/zend_API.c index fdbefde86b..9ddd3d67b6 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -1268,13 +1268,12 @@ ZEND_API void object_properties_init_ex(zend_object *object, HashTable *properti { object->properties = properties; if (object->ce->default_properties_count) { - zval *prop, tmp; + zval *prop; zend_string *key; zend_property_info *property_info; ZEND_HASH_FOREACH_STR_KEY_VAL(properties, key, prop) { - ZVAL_STR(&tmp, key); - property_info = zend_get_property_info(object->ce, &tmp, 1 TSRMLS_CC); + property_info = zend_get_property_info(object->ce, key, 1 TSRMLS_CC); if (property_info && (property_info->flags & ZEND_ACC_STATIC) == 0 && property_info->offset >= 0) { @@ -1293,8 +1292,7 @@ ZEND_API void object_properties_load(zend_object *object, HashTable *properties zend_property_info *property_info; ZEND_HASH_FOREACH_STR_KEY_VAL(properties, key, prop) { - ZVAL_STR(&tmp, key); - property_info = zend_get_property_info(object->ce, &tmp, 1 TSRMLS_CC); + property_info = zend_get_property_info(object->ce, key, 1 TSRMLS_CC); if (property_info && (property_info->flags & ZEND_ACC_STATIC) == 0 && property_info->offset >= 0) { diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c index ea32244b1b..956ff588f7 100644 --- a/Zend/zend_object_handlers.c +++ b/Zend/zend_object_handlers.c @@ -385,9 +385,9 @@ static zend_always_inline struct _zend_property_info *zend_get_property_info_qui } /* }}} */ -ZEND_API struct _zend_property_info *zend_get_property_info(zend_class_entry *ce, zval *member, int silent TSRMLS_DC) /* {{{ */ +ZEND_API struct _zend_property_info *zend_get_property_info(zend_class_entry *ce, zend_string *member, int silent TSRMLS_DC) /* {{{ */ { - return zend_get_property_info_quick(ce, Z_STR_P(member), silent, NULL TSRMLS_CC); + return zend_get_property_info_quick(ce, member, silent, NULL TSRMLS_CC); } /* }}} */ diff --git a/Zend/zend_object_handlers.h b/Zend/zend_object_handlers.h index ee6c9d9e5b..bc8500c3ec 100644 --- a/Zend/zend_object_handlers.h +++ b/Zend/zend_object_handlers.h @@ -159,7 +159,7 @@ ZEND_API union _zend_function *zend_std_get_static_method(zend_class_entry *ce, ZEND_API zval *zend_std_get_static_property(zend_class_entry *ce, zend_string *property_name, zend_bool silent, void **cache_slot TSRMLS_DC); ZEND_API zend_bool zend_std_unset_static_property(zend_class_entry *ce, zend_string *property_name, void **cache_slot TSRMLS_DC); ZEND_API union _zend_function *zend_std_get_constructor(zend_object *object TSRMLS_DC); -ZEND_API struct _zend_property_info *zend_get_property_info(zend_class_entry *ce, zval *member, int silent TSRMLS_DC); +ZEND_API struct _zend_property_info *zend_get_property_info(zend_class_entry *ce, zend_string *member, int silent TSRMLS_DC); ZEND_API HashTable *zend_std_get_properties(zval *object TSRMLS_DC); ZEND_API HashTable *zend_std_get_debug_info(zval *object, int *is_temp TSRMLS_DC); ZEND_API int zend_std_cast_object_tostring(zval *readobj, zval *writeobj, int type TSRMLS_DC); diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index 6888a6c5d9..c52f8d155c 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -3906,7 +3906,7 @@ static int _adddynproperty(zval *ptr TSRMLS_DC, int num_args, va_list args, zend { zval property; zend_class_entry *ce = *va_arg(args, zend_class_entry**); - zval *retval = va_arg(args, zval*), member; + zval *retval = va_arg(args, zval*); /* under some circumstances, the properties hash table may contain numeric * properties (e.g. when casting from array). This is a WONT FIX bug, at @@ -3919,8 +3919,7 @@ static int _adddynproperty(zval *ptr TSRMLS_DC, int num_args, va_list args, zend return 0; /* non public cannot be dynamic */ } - ZVAL_STR(&member, hash_key->key); - if (zend_get_property_info(ce, &member, 1 TSRMLS_CC) == &EG(std_property_info)) { + if (zend_get_property_info(ce, hash_key->key, 1 TSRMLS_CC) == &EG(std_property_info)) { EG(std_property_info).flags = ZEND_ACC_IMPLICIT_PUBLIC; reflection_property_factory(ce, &EG(std_property_info), &property TSRMLS_CC); add_next_index_zval(retval, &property); diff --git a/ext/soap/php_encoding.c b/ext/soap/php_encoding.c index 802a0773cb..6189f172a6 100644 --- a/ext/soap/php_encoding.c +++ b/ext/soap/php_encoding.c @@ -1201,7 +1201,7 @@ static zval* get_zval_property(zval* object, char* name, zval *rv TSRMLS_DC) /* Hack for bug #32455 */ zend_property_info *property_info; - property_info = zend_get_property_info(Z_OBJCE_P(object), &member, 1 TSRMLS_CC); + property_info = zend_get_property_info(Z_OBJCE_P(object), Z_STR(member), 1 TSRMLS_CC); EG(scope) = old_scope; if (property_info && zend_hash_exists(Z_OBJPROP_P(object), property_info->name)) { zval_ptr_dtor(&member); |