summaryrefslogtreecommitdiff
path: root/Zend/zend_objects_API.h
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/zend_objects_API.h')
-rw-r--r--Zend/zend_objects_API.h32
1 files changed, 19 insertions, 13 deletions
diff --git a/Zend/zend_objects_API.h b/Zend/zend_objects_API.h
index 25c263863c..b9a838e7bb 100644
--- a/Zend/zend_objects_API.h
+++ b/Zend/zend_objects_API.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2018 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -67,8 +67,6 @@ static zend_always_inline void zend_object_store_ctor_failed(zend_object *obj)
GC_ADD_FLAGS(obj, IS_OBJ_DESTRUCTOR_CALLED);
}
-#define ZEND_OBJECTS_STORE_HANDLERS 0, zend_object_std_dtor, zend_objects_destroy_object, zend_objects_clone_obj
-
END_EXTERN_C()
static zend_always_inline void zend_object_release(zend_object *obj)
@@ -97,15 +95,23 @@ static zend_always_inline void *zend_object_alloc(size_t obj_size, zend_class_en
return obj;
}
+static inline zend_property_info *zend_get_property_info_for_slot(zend_object *obj, zval *slot)
+{
+ zend_property_info **table = obj->ce->properties_info_table;
+ intptr_t prop_num = slot - obj->properties_table;
+ ZEND_ASSERT(prop_num >= 0 && prop_num < obj->ce->default_properties_count);
+ return table[prop_num];
+}
-#endif /* ZEND_OBJECTS_H */
+/* Helper for cases where we're only interested in property info of typed properties. */
+static inline zend_property_info *zend_get_typed_property_info_for_slot(zend_object *obj, zval *slot)
+{
+ zend_property_info *prop_info = zend_get_property_info_for_slot(obj, slot);
+ if (prop_info && prop_info->type) {
+ return prop_info;
+ }
+ return NULL;
+}
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * indent-tabs-mode: t
- * End:
- * vim600: sw=4 ts=4 fdm=marker
- * vim<600: sw=4 ts=4
- */
+
+#endif /* ZEND_OBJECTS_H */