summaryrefslogtreecommitdiff
path: root/Zend/zend_object_handlers.h
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2014-04-17 15:40:45 +0400
committerDmitry Stogov <dmitry@zend.com>2014-04-17 15:40:45 +0400
commite96073b1e40c4999dee70db684721a582ea5e055 (patch)
treed2bfacb90dc6742450a5f6b6112c1db1d088d8ac /Zend/zend_object_handlers.h
parentc92dd8eedf95f204520a3b2a15668d56a1aefbde (diff)
downloadphp-git-e96073b1e40c4999dee70db684721a582ea5e055.tar.gz
Moved zend_literal->cache_slot right into zval.
It should be accessed using Z_CACHE_SLOT() macro. zend_literal structure is removed. API functions that accepted pointer to zend_literal now accept pointer to zval or cache_slot directly. Calls of such functiond that now accept cache_slot need to be changed to pass -1 instead of NULL.
Diffstat (limited to 'Zend/zend_object_handlers.h')
-rw-r--r--Zend/zend_object_handlers.h21
1 files changed, 10 insertions, 11 deletions
diff --git a/Zend/zend_object_handlers.h b/Zend/zend_object_handlers.h
index 48e2e49cd8..1b6c85b8c5 100644
--- a/Zend/zend_object_handlers.h
+++ b/Zend/zend_object_handlers.h
@@ -24,14 +24,13 @@
union _zend_function;
struct _zend_property_info;
-struct _zend_literal;
/* The following rule applies to read_property() and read_dimension() implementations:
If you return a zval which is not otherwise referenced by the extension or the engine's
symbol table, its reference count should be 0.
*/
/* Used to fetch property from the object, read-only */
-typedef zval *(*zend_object_read_property_t)(zval *object, zval *member, int type, const struct _zend_literal *key, zval *rv TSRMLS_DC);
+typedef zval *(*zend_object_read_property_t)(zval *object, zval *member, int type, zend_uint cache_slot, zval *rv TSRMLS_DC);
/* Used to fetch dimension from the object, read-only */
typedef zval *(*zend_object_read_dimension_t)(zval *object, zval *offset, int type, zval *rv TSRMLS_DC);
@@ -43,14 +42,14 @@ typedef zval *(*zend_object_read_dimension_t)(zval *object, zval *offset, int ty
any changes. You should NOT modify the reference count of the value passed to you.
*/
/* Used to set property of the object */
-typedef void (*zend_object_write_property_t)(zval *object, zval *member, zval *value, const struct _zend_literal *key TSRMLS_DC);
+typedef void (*zend_object_write_property_t)(zval *object, zval *member, zval *value, zend_uint cache_slot TSRMLS_DC);
/* Used to set dimension of the object */
typedef void (*zend_object_write_dimension_t)(zval *object, zval *offset, zval *value TSRMLS_DC);
/* Used to create pointer to the property of the object, for future direct r/w access */
-typedef zval *(*zend_object_get_property_ptr_ptr_t)(zval *object, zval *member, int type, const struct _zend_literal *key TSRMLS_DC);
+typedef zval *(*zend_object_get_property_ptr_ptr_t)(zval *object, zval *member, int type, zend_uint cache_slot TSRMLS_DC);
/* Used to set object value. Can be used to override assignments and scalar
write ops (like ++, +=) on the object */
@@ -67,13 +66,13 @@ typedef zval* (*zend_object_get_t)(zval *object, zval *rv TSRMLS_DC);
* 1 (set) whether property exists and is true
* 2 (exists) whether property exists
*/
-typedef int (*zend_object_has_property_t)(zval *object, zval *member, int has_set_exists, const struct _zend_literal *key TSRMLS_DC);
+typedef int (*zend_object_has_property_t)(zval *object, zval *member, int has_set_exists, zend_uint cache_slot TSRMLS_DC);
/* Used to check if a dimension of the object exists */
typedef int (*zend_object_has_dimension_t)(zval *object, zval *member, int check_empty TSRMLS_DC);
/* Used to remove a property of the object */
-typedef void (*zend_object_unset_property_t)(zval *object, zval *member, const struct _zend_literal *key TSRMLS_DC);
+typedef void (*zend_object_unset_property_t)(zval *object, zval *member, zend_uint cache_slot TSRMLS_DC);
/* Used to remove a dimension of the object */
typedef void (*zend_object_unset_dimension_t)(zval *object, zval *offset TSRMLS_DC);
@@ -88,7 +87,7 @@ typedef HashTable *(*zend_object_get_debug_info_t)(zval *object, int *is_temp TS
/* Andi - EX(fbc) (function being called) needs to be initialized already in the INIT fcall opcode so that the parameters can be parsed the right way. We need to add another callback for this.
*/
typedef int (*zend_object_call_method_t)(zend_string *method, zend_object *object, INTERNAL_FUNCTION_PARAMETERS);
-typedef union _zend_function *(*zend_object_get_method_t)(zend_object **object, zend_string *method, const struct _zend_literal *key TSRMLS_DC);
+typedef union _zend_function *(*zend_object_get_method_t)(zend_object **object, zend_string *method, const zval *key TSRMLS_DC);
typedef union _zend_function *(*zend_object_get_constructor_t)(zend_object *object TSRMLS_DC);
/* Object maintenance/destruction */
@@ -156,15 +155,15 @@ extern ZEND_API zend_object_handlers std_object_handlers;
((fbc)->common.prototype ? (fbc)->common.prototype->common.scope : (fbc)->common.scope)
BEGIN_EXTERN_C()
-ZEND_API union _zend_function *zend_std_get_static_method(zend_class_entry *ce, zend_string *function_name_strval, const struct _zend_literal *key TSRMLS_DC);
-ZEND_API zval *zend_std_get_static_property(zend_class_entry *ce, zend_string *property_name, zend_bool silent, const struct _zend_literal *key TSRMLS_DC);
-ZEND_API zend_bool zend_std_unset_static_property(zend_class_entry *ce, zend_string *property_name, const struct _zend_literal *key TSRMLS_DC);
+ZEND_API union _zend_function *zend_std_get_static_method(zend_class_entry *ce, zend_string *function_name_strval, const zval *key TSRMLS_DC);
+ZEND_API zval *zend_std_get_static_property(zend_class_entry *ce, zend_string *property_name, zend_bool silent, zend_uint cache_slot TSRMLS_DC);
+ZEND_API zend_bool zend_std_unset_static_property(zend_class_entry *ce, zend_string *property_name, zend_uint 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 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);
-ZEND_API void zend_std_write_property(zval *object, zval *member, zval *value, const struct _zend_literal *key TSRMLS_DC);
+ZEND_API void zend_std_write_property(zval *object, zval *member, zval *value, zend_uint cache_slot TSRMLS_DC);
ZEND_API void rebuild_object_properties(zend_object *zobj);