Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Zend/zend_object_handlers.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
called, we cal __call handler.
*/

ZEND_API void rebuild_object_properties_internal(zend_object *zobj) /* {{{ */
ZEND_API HashTable *rebuild_object_properties_internal(zend_object *zobj) /* {{{ */
{
if (!zobj->properties) {
zend_property_info *prop_info;
Expand All @@ -88,6 +88,8 @@ ZEND_API void rebuild_object_properties_internal(zend_object *zobj) /* {{{ */
}
}
}

return zobj->properties;
}
/* }}} */

Expand Down Expand Up @@ -130,7 +132,7 @@ ZEND_API HashTable *zend_std_build_object_properties_array(zend_object *zobj) /*
ZEND_API HashTable *zend_std_get_properties(zend_object *zobj) /* {{{ */
{
if (!zobj->properties) {
rebuild_object_properties_internal(zobj);
return rebuild_object_properties_internal(zobj);
}
return zobj->properties;
}
Expand Down
6 changes: 3 additions & 3 deletions Zend/zend_object_handlers.h
Original file line number Diff line number Diff line change
Expand Up @@ -268,12 +268,12 @@ ZEND_API zend_string *zend_std_get_class_name(const zend_object *zobj);
ZEND_API int zend_std_compare_objects(zval *o1, zval *o2);
ZEND_API zend_result zend_std_get_closure(zend_object *obj, zend_class_entry **ce_ptr, zend_function **fptr_ptr, zend_object **obj_ptr, bool check_only);
/* Use zend_std_get_properties_ex() */
ZEND_API void rebuild_object_properties_internal(zend_object *zobj);
ZEND_API HashTable *rebuild_object_properties_internal(zend_object *zobj);

static inline HashTable *zend_std_get_properties_ex(zend_object *object)
static zend_always_inline HashTable *zend_std_get_properties_ex(zend_object *object)
{
if (!object->properties) {
rebuild_object_properties_internal(object);
return rebuild_object_properties_internal(object);
}
return object->properties;
}
Expand Down