Skip to content

Commit

Permalink
Followup GH-14996 (#15062)
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaud-lb committed Jul 22, 2024
1 parent 810999a commit f4eb81d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
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

0 comments on commit f4eb81d

Please sign in to comment.