summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2018-05-31 11:57:22 +0300
committerDmitry Stogov <dmitry@zend.com>2018-05-31 11:57:22 +0300
commitf2b4ec4bdc595773fb49b7d6ae8942c61f436288 (patch)
tree528873c7a446929a9298aaaaad4b6cef805fdc69
parent0d72bb8fcb0b2d658f9a40e473207f4a1f66df91 (diff)
downloadphp-git-f2b4ec4bdc595773fb49b7d6ae8942c61f436288.tar.gz
Export standard object handlers, to avoid indirect access
-rw-r--r--Zend/zend_builtin_functions.c6
-rw-r--r--Zend/zend_closures.c4
-rw-r--r--Zend/zend_exceptions.c2
-rw-r--r--Zend/zend_generators.c2
-rw-r--r--Zend/zend_object_handlers.c28
-rw-r--r--Zend/zend_object_handlers.h28
-rw-r--r--Zend/zend_objects_API.c5
-rw-r--r--Zend/zend_objects_API.h1
-rw-r--r--ext/com_dotnet/com_persist.c2
-rw-r--r--ext/date/php_date.c26
-rw-r--r--ext/dom/php_dom.c14
-rw-r--r--ext/fileinfo/fileinfo.c2
-rw-r--r--ext/gmp/gmp.c2
-rw-r--r--ext/hash/hash.c2
-rw-r--r--ext/intl/breakiterator/breakiterator_class.cpp2
-rw-r--r--ext/intl/breakiterator/breakiterator_iterators.cpp2
-rw-r--r--ext/intl/calendar/calendar_class.cpp2
-rw-r--r--ext/intl/collator/collator_class.c2
-rw-r--r--ext/intl/common/common_enum.cpp2
-rw-r--r--ext/intl/converter/converter.c2
-rw-r--r--ext/intl/dateformat/dateformat_class.c2
-rw-r--r--ext/intl/formatter/formatter_class.c2
-rw-r--r--ext/intl/msgformat/msgformat_class.c2
-rw-r--r--ext/intl/spoofchecker/spoofchecker_class.c2
-rw-r--r--ext/intl/timezone/timezone_class.cpp2
-rw-r--r--ext/intl/transliterator/transliterator_class.c8
-rw-r--r--ext/mysqli/mysqli.c13
-rw-r--r--ext/pdo/pdo_dbh.c4
-rw-r--r--ext/pdo/pdo_stmt.c8
-rw-r--r--ext/reflection/php_reflection.c7
-rw-r--r--ext/simplexml/simplexml.c2
-rw-r--r--ext/snmp/snmp.c11
-rw-r--r--ext/spl/spl_array.c26
-rw-r--r--ext/spl/spl_directory.c8
-rw-r--r--ext/spl/spl_dllist.c2
-rw-r--r--ext/spl/spl_fixedarray.c2
-rw-r--r--ext/spl/spl_heap.c6
-rw-r--r--ext/spl/spl_iterators.c8
-rw-r--r--ext/spl/spl_observer.c4
-rw-r--r--ext/sqlite3/sqlite3.c6
-rw-r--r--ext/tidy/tidy.c2
-rw-r--r--ext/xmlreader/php_xmlreader.c14
-rw-r--r--ext/xmlwriter/php_xmlwriter.c2
-rw-r--r--ext/xsl/php_xsl.c2
-rw-r--r--ext/xsl/xsltprocessor.c9
-rw-r--r--ext/zend_test/test.c2
-rw-r--r--ext/zip/php_zip.c14
47 files changed, 142 insertions, 164 deletions
diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c
index ac6a460ed6..c2380f622b 100644
--- a/Zend/zend_builtin_functions.c
+++ b/Zend/zend_builtin_functions.c
@@ -2290,7 +2290,7 @@ ZEND_FUNCTION(debug_print_backtrace)
if (object) {
if (func->common.scope) {
class_name = func->common.scope->name;
- } else if (object->handlers->get_class_name == std_object_handlers.get_class_name) {
+ } else if (object->handlers->get_class_name == zend_std_get_class_name) {
class_name = object->ce->name;
} else {
class_name = object->handlers->get_class_name(object);
@@ -2355,7 +2355,7 @@ ZEND_FUNCTION(debug_print_backtrace)
ZEND_PUTS(call_type);
if (object
&& !func->common.scope
- && object->handlers->get_class_name != std_object_handlers.get_class_name) {
+ && object->handlers->get_class_name != zend_std_get_class_name) {
zend_string_release_ex(class_name, 0);
}
}
@@ -2522,7 +2522,7 @@ ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last, int
if (object) {
if (func->common.scope) {
ZVAL_STR_COPY(&tmp, func->common.scope->name);
- } else if (object->handlers->get_class_name == std_object_handlers.get_class_name) {
+ } else if (object->handlers->get_class_name == zend_std_get_class_name) {
ZVAL_STR_COPY(&tmp, object->ce->name);
} else {
ZVAL_STR(&tmp, object->handlers->get_class_name(object));
diff --git a/Zend/zend_closures.c b/Zend/zend_closures.c
index 77ee4c4e6c..50b6796716 100644
--- a/Zend/zend_closures.c
+++ b/Zend/zend_closures.c
@@ -386,7 +386,7 @@ static zend_function *zend_closure_get_method(zend_object **object, zend_string
return zend_get_closure_invoke_method(*object);
}
- return std_object_handlers.get_method(object, method, key);
+ return zend_std_get_method(object, method, key);
}
/* }}} */
@@ -609,7 +609,7 @@ void zend_register_closure_ce(void) /* {{{ */
zend_ce_closure->serialize = zend_class_serialize_deny;
zend_ce_closure->unserialize = zend_class_unserialize_deny;
- memcpy(&closure_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
+ memcpy(&closure_handlers, &std_object_handlers, sizeof(zend_object_handlers));
closure_handlers.free_obj = zend_closure_free_storage;
closure_handlers.get_constructor = zend_closure_get_constructor;
closure_handlers.get_method = zend_closure_get_method;
diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c
index 02a3b972b2..cbc0b8ed52 100644
--- a/Zend/zend_exceptions.c
+++ b/Zend/zend_exceptions.c
@@ -808,7 +808,7 @@ void zend_register_default_exception(void) /* {{{ */
REGISTER_MAGIC_INTERFACE(throwable, Throwable);
- memcpy(&default_exception_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
+ memcpy(&default_exception_handlers, &std_object_handlers, sizeof(zend_object_handlers));
default_exception_handlers.clone_obj = NULL;
INIT_CLASS_ENTRY(ce, "Exception", default_exception_functions);
diff --git a/Zend/zend_generators.c b/Zend/zend_generators.c
index 07d247d068..90e5529f00 100644
--- a/Zend/zend_generators.c
+++ b/Zend/zend_generators.c
@@ -1201,7 +1201,7 @@ void zend_register_generator_ce(void) /* {{{ */
zend_ce_generator->get_iterator = zend_generator_get_iterator;
zend_ce_generator->iterator_funcs.funcs = &zend_generator_iterator_functions;
- memcpy(&zend_generator_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
+ memcpy(&zend_generator_handlers, &std_object_handlers, sizeof(zend_object_handlers));
zend_generator_handlers.free_obj = zend_generator_free_storage;
zend_generator_handlers.dtor_obj = zend_generator_dtor_storage;
zend_generator_handlers.get_gc = zend_generator_get_gc;
diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c
index 07a6847804..08d6a3f94e 100644
--- a/Zend/zend_object_handlers.c
+++ b/Zend/zend_object_handlers.c
@@ -536,7 +536,7 @@ ZEND_API uint32_t *zend_get_property_guard(zend_object *zobj, zend_string *membe
}
/* }}} */
-zval *zend_std_read_property(zval *object, zval *member, int type, void **cache_slot, zval *rv) /* {{{ */
+ZEND_API zval *zend_std_read_property(zval *object, zval *member, int type, void **cache_slot, zval *rv) /* {{{ */
{
zend_object *zobj;
zval tmp_member, tmp_object;
@@ -770,7 +770,7 @@ exit:
}
/* }}} */
-zval *zend_std_read_dimension(zval *object, zval *offset, int type, zval *rv) /* {{{ */
+ZEND_API zval *zend_std_read_dimension(zval *object, zval *offset, int type, zval *rv) /* {{{ */
{
zend_class_entry *ce = Z_OBJCE_P(object);
zval tmp_offset, tmp_object;
@@ -820,7 +820,7 @@ zval *zend_std_read_dimension(zval *object, zval *offset, int type, zval *rv) /*
}
/* }}} */
-static void zend_std_write_dimension(zval *object, zval *offset, zval *value) /* {{{ */
+ZEND_API void zend_std_write_dimension(zval *object, zval *offset, zval *value) /* {{{ */
{
zend_class_entry *ce = Z_OBJCE_P(object);
zval tmp_offset, tmp_object;
@@ -842,7 +842,7 @@ static void zend_std_write_dimension(zval *object, zval *offset, zval *value) /*
}
/* }}} */
-static int zend_std_has_dimension(zval *object, zval *offset, int check_empty) /* {{{ */
+ZEND_API int zend_std_has_dimension(zval *object, zval *offset, int check_empty) /* {{{ */
{
zend_class_entry *ce = Z_OBJCE_P(object);
zval retval, tmp_offset, tmp_object;
@@ -876,7 +876,7 @@ static int zend_std_has_dimension(zval *object, zval *offset, int check_empty) /
}
/* }}} */
-static zval *zend_std_get_property_ptr_ptr(zval *object, zval *member, int type, void **cache_slot) /* {{{ */
+ZEND_API zval *zend_std_get_property_ptr_ptr(zval *object, zval *member, int type, void **cache_slot) /* {{{ */
{
zend_object *zobj;
zend_string *name, *tmp_name;
@@ -940,7 +940,7 @@ static zval *zend_std_get_property_ptr_ptr(zval *object, zval *member, int type,
}
/* }}} */
-static void zend_std_unset_property(zval *object, zval *member, void **cache_slot) /* {{{ */
+ZEND_API void zend_std_unset_property(zval *object, zval *member, void **cache_slot) /* {{{ */
{
zend_object *zobj;
zval tmp_member;
@@ -1010,7 +1010,7 @@ exit:
}
/* }}} */
-static void zend_std_unset_dimension(zval *object, zval *offset) /* {{{ */
+ZEND_API void zend_std_unset_dimension(zval *object, zval *offset) /* {{{ */
{
zend_class_entry *ce = Z_OBJCE_P(object);
zval tmp_offset, tmp_object;
@@ -1158,7 +1158,7 @@ static zend_always_inline zend_function *zend_get_user_call_function(zend_class_
}
/* }}} */
-static union _zend_function *zend_std_get_method(zend_object **obj_ptr, zend_string *method_name, const zval *key) /* {{{ */
+ZEND_API zend_function *zend_std_get_method(zend_object **obj_ptr, zend_string *method_name, const zval *key) /* {{{ */
{
zend_object *zobj = *obj_ptr;
zval *func;
@@ -1399,7 +1399,7 @@ ZEND_API ZEND_COLD zend_bool zend_std_unset_static_property(zend_class_entry *ce
}
/* }}} */
-ZEND_API union _zend_function *zend_std_get_constructor(zend_object *zobj) /* {{{ */
+ZEND_API zend_function *zend_std_get_constructor(zend_object *zobj) /* {{{ */
{
zend_function *constructor = zobj->ce->constructor;
zend_class_entry *scope;
@@ -1450,7 +1450,7 @@ ZEND_API union _zend_function *zend_std_get_constructor(zend_object *zobj) /* {{
}
/* }}} */
-static int zend_std_compare_objects(zval *o1, zval *o2) /* {{{ */
+ZEND_API int zend_std_compare_objects(zval *o1, zval *o2) /* {{{ */
{
zend_object *zobj1, *zobj2;
@@ -1522,7 +1522,7 @@ static int zend_std_compare_objects(zval *o1, zval *o2) /* {{{ */
}
/* }}} */
-static int zend_std_has_property(zval *object, zval *member, int has_set_exists, void **cache_slot) /* {{{ */
+ZEND_API int zend_std_has_property(zval *object, zval *member, int has_set_exists, void **cache_slot) /* {{{ */
{
zend_object *zobj;
int result;
@@ -1640,7 +1640,7 @@ exit:
}
/* }}} */
-zend_string *zend_std_object_get_class_name(const zend_object *zobj) /* {{{ */
+ZEND_API zend_string *zend_std_get_class_name(const zend_object *zobj) /* {{{ */
{
return zend_string_copy(zobj->ce->name);
}
@@ -1708,7 +1708,7 @@ ZEND_API int zend_std_cast_object_tostring(zval *readobj, zval *writeobj, int ty
}
/* }}} */
-int zend_std_get_closure(zval *obj, zend_class_entry **ce_ptr, zend_function **fptr_ptr, zend_object **obj_ptr) /* {{{ */
+ZEND_API int zend_std_get_closure(zval *obj, zend_class_entry **ce_ptr, zend_function **fptr_ptr, zend_object **obj_ptr) /* {{{ */
{
zval *func;
zend_class_entry *ce = Z_OBJCE_P(obj);
@@ -1754,7 +1754,7 @@ ZEND_API const zend_object_handlers std_object_handlers = {
zend_std_get_method, /* get_method */
NULL, /* call_method */
zend_std_get_constructor, /* get_constructor */
- zend_std_object_get_class_name, /* get_class_name */
+ zend_std_get_class_name, /* get_class_name */
zend_std_compare_objects, /* compare_objects */
zend_std_cast_object_tostring, /* cast_object */
NULL, /* count_elements */
diff --git a/Zend/zend_object_handlers.h b/Zend/zend_object_handlers.h
index 4da62e524f..1dfed715f3 100644
--- a/Zend/zend_object_handlers.h
+++ b/Zend/zend_object_handlers.h
@@ -100,8 +100,8 @@ typedef HashTable *(*zend_object_get_debug_info_t)(zval *object, int *is_temp);
/* 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 zval *key);
-typedef union _zend_function *(*zend_object_get_constructor_t)(zend_object *object);
+typedef zend_function *(*zend_object_get_method_t)(zend_object **object, zend_string *method, const zval *key);
+typedef zend_function *(*zend_object_get_constructor_t)(zend_object *object);
/* Object maintenance/destruction */
typedef void (*zend_object_dtor_obj_t)(zend_object *object);
@@ -124,7 +124,7 @@ typedef int (*zend_object_cast_t)(zval *readobj, zval *retval, int type);
* Returns FAILURE if the object does not have any sense of overloaded dimensions */
typedef int (*zend_object_count_elements_t)(zval *object, zend_long *count);
-typedef int (*zend_object_get_closure_t)(zval *obj, zend_class_entry **ce_ptr, union _zend_function **fptr_ptr, zend_object **obj_ptr);
+typedef int (*zend_object_get_closure_t)(zval *obj, zend_class_entry **ce_ptr, zend_function **fptr_ptr, zend_object **obj_ptr);
typedef HashTable *(*zend_object_get_gc_t)(zval *object, zval **table, int *n);
@@ -167,21 +167,37 @@ struct _zend_object_handlers {
BEGIN_EXTERN_C()
extern const ZEND_API zend_object_handlers std_object_handlers;
+#define zend_get_std_object_handlers() \
+ (&std_object_handlers)
+
#define zend_get_function_root_class(fbc) \
((fbc)->common.prototype ? (fbc)->common.prototype->common.scope : (fbc)->common.scope)
-ZEND_API union _zend_function *zend_std_get_static_method(zend_class_entry *ce, zend_string *function_name_strval, const zval *key);
+ZEND_API zend_function *zend_std_get_static_method(zend_class_entry *ce, zend_string *function_name_strval, const zval *key);
ZEND_API zval *zend_std_get_static_property(zend_class_entry *ce, zend_string *property_name, zend_bool silent);
ZEND_API ZEND_COLD zend_bool zend_std_unset_static_property(zend_class_entry *ce, zend_string *property_name);
-ZEND_API union _zend_function *zend_std_get_constructor(zend_object *object);
+ZEND_API zend_function *zend_std_get_constructor(zend_object *object);
ZEND_API struct _zend_property_info *zend_get_property_info(zend_class_entry *ce, zend_string *member, int silent);
ZEND_API HashTable *zend_std_get_properties(zval *object);
+ZEND_API HashTable *zend_std_get_gc(zval *object, zval **table, int *n);
ZEND_API HashTable *zend_std_get_debug_info(zval *object, int *is_temp);
ZEND_API int zend_std_cast_object_tostring(zval *readobj, zval *writeobj, int type);
+ZEND_API zval *zend_std_get_property_ptr_ptr(zval *object, zval *member, int type, void **cache_slot);
+ZEND_API zval *zend_std_read_property(zval *object, zval *member, int type, void **cache_slot, zval *rv);
ZEND_API void zend_std_write_property(zval *object, zval *member, zval *value, void **cache_slot);
+ZEND_API int zend_std_has_property(zval *object, zval *member, int has_set_exists, void **cache_slot);
+ZEND_API void zend_std_unset_property(zval *object, zval *member, void **cache_slot);
+ZEND_API zval *zend_std_read_dimension(zval *object, zval *offset, int type, zval *rv);
+ZEND_API void zend_std_write_dimension(zval *object, zval *offset, zval *value);
+ZEND_API int zend_std_has_dimension(zval *object, zval *offset, int check_empty);
+ZEND_API void zend_std_unset_dimension(zval *object, zval *offset);
+ZEND_API zend_function *zend_std_get_method(zend_object **obj_ptr, zend_string *method_name, const zval *key);
+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 int zend_std_get_closure(zval *obj, zend_class_entry **ce_ptr, zend_function **fptr_ptr, zend_object **obj_ptr);
ZEND_API void rebuild_object_properties(zend_object *zobj);
-ZEND_API int zend_check_private(union _zend_function *fbc, zend_class_entry *ce, zend_string *function_name);
+ZEND_API int zend_check_private(zend_function *fbc, zend_class_entry *ce, zend_string *function_name);
ZEND_API int zend_check_protected(zend_class_entry *ce, zend_class_entry *scope);
diff --git a/Zend/zend_objects_API.c b/Zend/zend_objects_API.c
index a2de370b49..633abccabb 100644
--- a/Zend/zend_objects_API.c
+++ b/Zend/zend_objects_API.c
@@ -197,11 +197,6 @@ ZEND_API void ZEND_FASTCALL zend_objects_store_del(zend_object *object) /* {{{ *
}
/* }}} */
-ZEND_API const zend_object_handlers* ZEND_FASTCALL zend_get_std_object_handlers(void)
-{
- return &std_object_handlers;
-}
-
/*
* Local variables:
* tab-width: 4
diff --git a/Zend/zend_objects_API.h b/Zend/zend_objects_API.h
index 2ebaa74360..6fac2b535e 100644
--- a/Zend/zend_objects_API.h
+++ b/Zend/zend_objects_API.h
@@ -67,7 +67,6 @@ static zend_always_inline void zend_object_store_ctor_failed(zend_object *obj)
#define ZEND_OBJECTS_STORE_HANDLERS 0, zend_object_std_dtor, zend_objects_destroy_object, zend_objects_clone_obj
-ZEND_API const zend_object_handlers * ZEND_FASTCALL zend_get_std_object_handlers(void);
END_EXTERN_C()
static zend_always_inline void zend_object_release(zend_object *obj)
diff --git a/ext/com_dotnet/com_persist.c b/ext/com_dotnet/com_persist.c
index 68e9de9455..6a8137a2ef 100644
--- a/ext/com_dotnet/com_persist.c
+++ b/ext/com_dotnet/com_persist.c
@@ -753,7 +753,7 @@ int php_com_persist_minit(INIT_FUNC_ARGS)
{
zend_class_entry ce;
- memcpy(&helper_handlers, zend_get_std_object_handlers(), sizeof(helper_handlers));
+ memcpy(&helper_handlers, &std_object_handlers, sizeof(helper_handlers));
helper_handlers.free_obj = helper_free_storage;
helper_handlers.clone_obj = helper_clone;
diff --git a/ext/date/php_date.c b/ext/date/php_date.c
index 81ef632cb2..cc46c5fd23 100644
--- a/ext/date/php_date.c
+++ b/ext/date/php_date.c
@@ -2062,7 +2062,7 @@ static int date_interval_has_property(zval *object, zval *member, int type, void
obj = Z_PHPINTERVAL_P(object);
if (!obj->initialized) {
- retval = (zend_get_std_object_handlers())->has_property(object, member, type, cache_slot);
+ retval = zend_std_has_property(object, member, type, cache_slot);
if (member == &tmp_member) {
zval_dtor(member);
}
@@ -2080,7 +2080,7 @@ static int date_interval_has_property(zval *object, zval *member, int type, void
retval = (Z_TYPE_P(prop) != IS_NULL);
}
} else {
- retval = (zend_get_std_object_handlers())->has_property(object, member, type, cache_slot);
+ retval = zend_std_has_property(object, member, type, cache_slot);
}
if (member == &tmp_member) {
@@ -2120,7 +2120,7 @@ static void date_register_classes(void) /* {{{ */
INIT_CLASS_ENTRY(ce_date, "DateTime", date_funcs_date);
ce_date.create_object = date_object_new_date;
date_ce_date = zend_register_internal_class_ex(&ce_date, NULL);
- memcpy(&date_object_handlers_date, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
+ memcpy(&date_object_handlers_date, &std_object_handlers, sizeof(zend_object_handlers));
date_object_handlers_date.offset = XtOffsetOf(php_date_obj, std);
date_object_handlers_date.free_obj = date_object_free_storage_date;
date_object_handlers_date.clone_obj = date_object_clone_date;
@@ -2132,7 +2132,7 @@ static void date_register_classes(void) /* {{{ */
INIT_CLASS_ENTRY(ce_immutable, "DateTimeImmutable", date_funcs_immutable);
ce_immutable.create_object = date_object_new_date;
date_ce_immutable = zend_register_internal_class_ex(&ce_immutable, NULL);
- memcpy(&date_object_handlers_immutable, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
+ memcpy(&date_object_handlers_immutable, &std_object_handlers, sizeof(zend_object_handlers));
date_object_handlers_immutable.clone_obj = date_object_clone_date;
date_object_handlers_immutable.compare_objects = date_object_compare_date;
date_object_handlers_immutable.get_properties = date_object_get_properties;
@@ -2142,7 +2142,7 @@ static void date_register_classes(void) /* {{{ */
INIT_CLASS_ENTRY(ce_timezone, "DateTimeZone", date_funcs_timezone);
ce_timezone.create_object = date_object_new_timezone;
date_ce_timezone = zend_register_internal_class_ex(&ce_timezone, NULL);
- memcpy(&date_object_handlers_timezone, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
+ memcpy(&date_object_handlers_timezone, &std_object_handlers, sizeof(zend_object_handlers));
date_object_handlers_timezone.offset = XtOffsetOf(php_timezone_obj, std);
date_object_handlers_timezone.free_obj = date_object_free_storage_timezone;
date_object_handlers_timezone.clone_obj = date_object_clone_timezone;
@@ -2171,7 +2171,7 @@ static void date_register_classes(void) /* {{{ */
INIT_CLASS_ENTRY(ce_interval, "DateInterval", date_funcs_interval);
ce_interval.create_object = date_object_new_interval;
date_ce_interval = zend_register_internal_class_ex(&ce_interval, NULL);
- memcpy(&date_object_handlers_interval, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
+ memcpy(&date_object_handlers_interval, &std_object_handlers, sizeof(zend_object_handlers));
date_object_handlers_interval.offset = XtOffsetOf(php_interval_obj, std);
date_object_handlers_interval.free_obj = date_object_free_storage_interval;
date_object_handlers_interval.clone_obj = date_object_clone_interval;
@@ -2188,7 +2188,7 @@ static void date_register_classes(void) /* {{{ */
date_ce_period->get_iterator = date_object_period_get_iterator;
date_ce_period->iterator_funcs.funcs = &date_period_it_funcs;
zend_class_implements(date_ce_period, 1, zend_ce_traversable);
- memcpy(&date_object_handlers_period, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
+ memcpy(&date_object_handlers_period, &std_object_handlers, sizeof(zend_object_handlers));
date_object_handlers_period.offset = XtOffsetOf(php_period_obj, std);
date_object_handlers_period.free_obj = date_object_free_storage_period;
date_object_handlers_period.clone_obj = date_object_clone_period;
@@ -4176,7 +4176,7 @@ zval *date_interval_read_property(zval *object, zval *member, int type, void **c
obj = Z_PHPINTERVAL_P(object);
if (!obj->initialized) {
- retval = (zend_get_std_object_handlers())->read_property(object, member, type, cache_slot, rv);
+ retval = zend_std_read_property(object, member, type, cache_slot, rv);
if (member == &tmp_member) {
zval_dtor(member);
}
@@ -4202,7 +4202,7 @@ zval *date_interval_read_property(zval *object, zval *member, int type, void **c
GET_VALUE_FROM_STRUCT(invert, "invert");
GET_VALUE_FROM_STRUCT(days, "days");
/* didn't find any */
- retval = (zend_get_std_object_handlers())->read_property(object, member, type, cache_slot, rv);
+ retval = zend_std_read_property(object, member, type, cache_slot, rv);
if (member == &tmp_member) {
zval_dtor(member);
@@ -4244,7 +4244,7 @@ void date_interval_write_property(zval *object, zval *member, zval *value, void
obj = Z_PHPINTERVAL_P(object);
if (!obj->initialized) {
- (zend_get_std_object_handlers())->write_property(object, member, value, cache_slot);
+ zend_std_write_property(object, member, value, cache_slot);
if (member == &tmp_member) {
zval_dtor(member);
}
@@ -4270,7 +4270,7 @@ void date_interval_write_property(zval *object, zval *member, zval *value, void
}
SET_VALUE_FROM_STRUCT(invert, "invert");
/* didn't find any */
- (zend_get_std_object_handlers())->write_property(object, member, value, cache_slot);
+ zend_std_write_property(object, member, value, cache_slot);
} while(0);
if (member == &tmp_member) {
@@ -4301,7 +4301,7 @@ static zval *date_interval_get_property_ptr_ptr(zval *object, zval *member, int
/* Fallback to read_property. */
ret = NULL;
} else {
- ret = (zend_get_std_object_handlers())->get_property_ptr_ptr(object, member, type, cache_slot);
+ ret = zend_std_get_property_ptr_ptr(object, member, type, cache_slot);
}
if (member == &tmp_member) {
@@ -5304,7 +5304,7 @@ static zval *date_period_read_property(zval *object, zval *member, int type, voi
Z_OBJPROP_P(object); /* build properties hash table */
- zv = std_object_handlers.read_property(object, member, type, cache_slot, rv);
+ zv = zend_std_read_property(object, member, type, cache_slot, rv);
if (Z_TYPE_P(zv) == IS_OBJECT && Z_OBJ_HANDLER_P(zv, clone_obj)) {
/* defensive copy */
ZVAL_OBJ(zv, Z_OBJ_HANDLER_P(zv, clone_obj)(zv));
diff --git a/ext/dom/php_dom.c b/ext/dom/php_dom.c
index 61346cd590..a9220863d2 100644
--- a/ext/dom/php_dom.c
+++ b/ext/dom/php_dom.c
@@ -319,8 +319,7 @@ static zval *dom_get_property_ptr_ptr(zval *object, zval *member, int type, void
zval *retval = NULL;
if (!obj->prop_handler || !zend_hash_exists(obj->prop_handler, member_str)) {
- const zend_object_handlers *std_hnd = zend_get_std_object_handlers();
- retval = std_hnd->get_property_ptr_ptr(object, member, type, cache_slot);
+ retval = zend_std_get_property_ptr_ptr(object, member, type, cache_slot);
}
zend_string_release_ex(member_str, 0);
@@ -350,8 +349,7 @@ zval *dom_read_property(zval *object, zval *member, int type, void **cache_slot,
retval = &EG(uninitialized_zval);
}
} else {
- const zend_object_handlers *std_hnd = zend_get_std_object_handlers();
- retval = std_hnd->read_property(object, member, type, cache_slot, rv);
+ retval = zend_std_read_property(object, member, type, cache_slot, rv);
}
zend_string_release_ex(member_str, 0);
@@ -372,8 +370,7 @@ void dom_write_property(zval *object, zval *member, zval *value, void **cache_sl
if (hnd) {
hnd->write_func(obj, value);
} else {
- const zend_object_handlers *std_hnd = zend_get_std_object_handlers();
- std_hnd->write_property(object, member, value, cache_slot);
+ zend_std_write_property(object, member, value, cache_slot);
}
zend_string_release_ex(member_str, 0);
@@ -405,8 +402,7 @@ static int dom_property_exists(zval *object, zval *member, int check_empty, void
zval_dtor(&tmp);
}
} else {
- const zend_object_handlers *std_hnd = zend_get_std_object_handlers();
- retval = std_hnd->has_property(object, member, check_empty, cache_slot);
+ retval = zend_std_has_property(object, member, check_empty, cache_slot);
}
zend_string_release_ex(member_str, 0);
@@ -598,7 +594,7 @@ PHP_MINIT_FUNCTION(dom)
{
zend_class_entry ce;
- memcpy(&dom_object_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
+ memcpy(&dom_object_handlers, &std_object_handlers, sizeof(zend_object_handlers));
dom_object_handlers.offset = XtOffsetOf(dom_object, std);
dom_object_handlers.free_obj = dom_objects_free_storage;
dom_object_handlers.read_property = dom_read_property;
diff --git a/ext/fileinfo/fileinfo.c b/ext/fileinfo/fileinfo.c
index 998536d8b2..b85f1d58d0 100644
--- a/ext/fileinfo/fileinfo.c
+++ b/ext/fileinfo/fileinfo.c
@@ -217,7 +217,7 @@ PHP_MINIT_FUNCTION(finfo)
finfo_class_entry = zend_register_internal_class(&_finfo_class_entry);
/* copy the standard object handlers to you handler table */
- memcpy(&finfo_object_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
+ memcpy(&finfo_object_handlers, &std_object_handlers, sizeof(zend_object_handlers));
finfo_object_handlers.offset = XtOffsetOf(finfo_object, zo);
finfo_object_handlers.free_obj = finfo_objects_free;
diff --git a/ext/gmp/gmp.c b/ext/gmp/gmp.c
index 1f496e8469..b3cc77e750 100644
--- a/ext/gmp/gmp.c
+++ b/ext/gmp/gmp.c
@@ -663,7 +663,7 @@ ZEND_MINIT_FUNCTION(gmp)
gmp_ce->serialize = gmp_serialize;
gmp_ce->unserialize = gmp_unserialize;
- memcpy(&gmp_object_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
+ memcpy(&gmp_object_handlers, &std_object_handlers, sizeof(zend_object_handlers));
gmp_object_handlers.offset = XtOffsetOf(gmp_object, std);
gmp_object_handlers.free_obj = gmp_free_object_storage;
gmp_object_handlers.cast_object = gmp_cast_object;
diff --git a/ext/hash/hash.c b/ext/hash/hash.c
index 6819b32c82..bf50ed6209 100644
--- a/ext/hash/hash.c
+++ b/ext/hash/hash.c
@@ -1241,7 +1241,7 @@ PHP_MINIT_FUNCTION(hash)
php_hashcontext_ce->serialize = zend_class_serialize_deny;
php_hashcontext_ce->unserialize = zend_class_unserialize_deny;
- memcpy(&php_hashcontext_handlers, zend_get_std_object_handlers(),
+ memcpy(&php_hashcontext_handlers, &std_object_handlers,
sizeof(zend_object_handlers));
php_hashcontext_handlers.offset = XtOffsetOf(php_hashcontext_object, std);
php_hashcontext_handlers.dtor_obj = php_hashcontext_dtor;
diff --git a/ext/intl/breakiterator/breakiterator_class.cpp b/ext/intl/breakiterator/breakiterator_class.cpp
index 51433bf43f..7ff9d47e1d 100644
--- a/ext/intl/breakiterator/breakiterator_class.cpp
+++ b/ext/intl/breakiterator/breakiterator_class.cpp
@@ -319,7 +319,7 @@ U_CFUNC void breakiterator_register_BreakIterator_class(void)
ce.get_iterator = _breakiterator_get_iterator;
BreakIterator_ce_ptr = zend_register_internal_class(&ce);
- memcpy(&BreakIterator_handlers, zend_get_std_object_handlers(),
+ memcpy(&BreakIterator_handlers, &std_object_handlers,
sizeof BreakIterator_handlers);
BreakIterator_handlers.offset = XtOffsetOf(BreakIterator_object, zo);
BreakIterator_handlers.compare_objects = BreakIterator_compare_objects;
diff --git a/ext/intl/breakiterator/breakiterator_iterators.cpp b/ext/intl/breakiterator/breakiterator_iterators.cpp
index c04e34cf27..66ddfee577 100644
--- a/ext/intl/breakiterator/breakiterator_iterators.cpp
+++ b/ext/intl/breakiterator/breakiterator_iterators.cpp
@@ -263,7 +263,7 @@ U_CFUNC zend_function *IntlPartsIterator_get_method(zend_object **object_ptr, ze
}
}
- ret = std_object_handlers.get_method(object_ptr, method, key);
+ ret = zend_std_get_method(object_ptr, method, key);
end:
if (key == NULL) {
diff --git a/ext/intl/calendar/calendar_class.cpp b/ext/intl/calendar/calendar_class.cpp
index a3844d3266..8189beffd4 100644
--- a/ext/intl/calendar/calendar_class.cpp
+++ b/ext/intl/calendar/calendar_class.cpp
@@ -459,7 +459,7 @@ void calendar_register_IntlCalendar_class(void)
ce.create_object = Calendar_object_create;
Calendar_ce_ptr = zend_register_internal_class(&ce);
- memcpy( &Calendar_handlers, zend_get_std_object_handlers(),
+ memcpy( &Calendar_handlers, &std_object_handlers,
sizeof Calendar_handlers);
Calendar_handlers.offset = XtOffsetOf(Calendar_object, zo);
Calendar_handlers.clone_obj = Calendar_clone_obj;
diff --git a/ext/intl/collator/collator_class.c b/ext/intl/collator/collator_class.c
index 42562eae48..d7d6ed4ed9 100644
--- a/ext/intl/collator/collator_class.c
+++ b/ext/intl/collator/collator_class.c
@@ -127,7 +127,7 @@ void collator_register_Collator_class( void )
ce.create_object = Collator_object_create;
Collator_ce_ptr = zend_register_internal_class( &ce );
- memcpy(&Collator_handlers, zend_get_std_object_handlers(),
+ memcpy(&Collator_handlers, &std_object_handlers,
sizeof Collator_handlers);
/* Collator has no usable clone semantics - ucol_cloneBinary/ucol_openBinary require binary buffer
for which we don't have the place to keep */
diff --git a/ext/intl/common/common_enum.cpp b/ext/intl/common/common_enum.cpp
index 9b95f25528..a19fa9ddf7 100644
--- a/ext/intl/common/common_enum.cpp
+++ b/ext/intl/common/common_enum.cpp
@@ -321,7 +321,7 @@ U_CFUNC void intl_register_IntlIterator_class(void)
zend_class_implements(IntlIterator_ce_ptr, 1,
zend_ce_iterator);
- memcpy(&IntlIterator_handlers, zend_get_std_object_handlers(),
+ memcpy(&IntlIterator_handlers, &std_object_handlers,
sizeof IntlIterator_handlers);
IntlIterator_handlers.offset = XtOffsetOf(IntlIterator_object, zo);
IntlIterator_handlers.clone_obj = NULL;
diff --git a/ext/intl/converter/converter.c b/ext/intl/converter/converter.c
index 3d1d12dacc..7d012b86bb 100644
--- a/ext/intl/converter/converter.c
+++ b/ext/intl/converter/converter.c
@@ -1088,7 +1088,7 @@ int php_converter_minit(INIT_FUNC_ARGS) {
INIT_CLASS_ENTRY(ce, "UConverter", php_converter_methods);
php_converter_ce = zend_register_internal_class(&ce);
php_converter_ce->create_object = php_converter_create_object;
- memcpy(&php_converter_object_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
+ memcpy(&php_converter_object_handlers, &std_object_handlers, sizeof(zend_object_handlers));
php_converter_object_handlers.offset = XtOffsetOf(php_converter_object, obj);
php_converter_object_handlers.clone_obj = php_converter_clone_object;
php_converter_object_handlers.dtor_obj = php_converter_dtor_object;
diff --git a/ext/intl/dateformat/dateformat_class.c b/ext/intl/dateformat/dateformat_class.c
index c8a2e22e90..fc2be15e1e 100644
--- a/ext/intl/dateformat/dateformat_class.c
+++ b/ext/intl/dateformat/dateformat_class.c
@@ -195,7 +195,7 @@ void dateformat_register_IntlDateFormatter_class( void )
ce.create_object = IntlDateFormatter_object_create;
IntlDateFormatter_ce_ptr = zend_register_internal_class( &ce );
- memcpy(&IntlDateFormatter_handlers, zend_get_std_object_handlers(),
+ memcpy(&IntlDateFormatter_handlers, &std_object_handlers,
sizeof IntlDateFormatter_handlers);
IntlDateFormatter_handlers.offset = XtOffsetOf(IntlDateFormatter_object, zo);
IntlDateFormatter_handlers.clone_obj = IntlDateFormatter_object_clone;
diff --git a/ext/intl/formatter/formatter_class.c b/ext/intl/formatter/formatter_class.c
index 22a2a4e3e3..d2356d5759 100644
--- a/ext/intl/formatter/formatter_class.c
+++ b/ext/intl/formatter/formatter_class.c
@@ -184,7 +184,7 @@ void formatter_register_class( void )
ce.create_object = NumberFormatter_object_create;
NumberFormatter_ce_ptr = zend_register_internal_class( &ce );
- memcpy(&NumberFormatter_handlers, zend_get_std_object_handlers(),
+ memcpy(&NumberFormatter_handlers, &std_object_handlers,
sizeof(NumberFormatter_handlers));
NumberFormatter_handlers.offset = XtOffsetOf(NumberFormatter_object, zo);
NumberFormatter_handlers.clone_obj = NumberFormatter_object_clone;
diff --git a/ext/intl/msgformat/msgformat_class.c b/ext/intl/msgformat/msgformat_class.c
index a61d8f4d3e..8501a2fe65 100644
--- a/ext/intl/msgformat/msgformat_class.c
+++ b/ext/intl/msgformat/msgformat_class.c
@@ -152,7 +152,7 @@ void msgformat_register_class( void )
ce.create_object = MessageFormatter_object_create;
MessageFormatter_ce_ptr = zend_register_internal_class( &ce );
- memcpy(&MessageFormatter_handlers, zend_get_std_object_handlers(),
+ memcpy(&MessageFormatter_handlers, &std_object_handlers,
sizeof MessageFormatter_handlers);
MessageFormatter_handlers.offset = XtOffsetOf(MessageFormatter_object, zo);
MessageFormatter_handlers.clone_obj = MessageFormatter_object_clone;
diff --git a/ext/intl/spoofchecker/spoofchecker_class.c b/ext/intl/spoofchecker/spoofchecker_class.c
index f94220526d..f24eed3869 100644
--- a/ext/intl/spoofchecker/spoofchecker_class.c
+++ b/ext/intl/spoofchecker/spoofchecker_class.c
@@ -144,7 +144,7 @@ void spoofchecker_register_Spoofchecker_class(void)
ce.create_object = Spoofchecker_object_create;
Spoofchecker_ce_ptr = zend_register_internal_class(&ce);
- memcpy(&Spoofchecker_handlers, zend_get_std_object_handlers(),
+ memcpy(&Spoofchecker_handlers, &std_object_handlers,
sizeof Spoofchecker_handlers);
Spoofchecker_handlers.offset = XtOffsetOf(Spoofchecker_object, zo);
Spoofchecker_handlers.clone_obj = spoofchecker_clone_obj;
diff --git a/ext/intl/timezone/timezone_class.cpp b/ext/intl/timezone/timezone_class.cpp
index 70d2067a1c..2bf8c990ab 100644
--- a/ext/intl/timezone/timezone_class.cpp
+++ b/ext/intl/timezone/timezone_class.cpp
@@ -513,7 +513,7 @@ U_CFUNC void timezone_register_IntlTimeZone_class(void)
return;
}
- memcpy(&TimeZone_handlers, zend_get_std_object_handlers(),
+ memcpy(&TimeZone_handlers, &std_object_handlers,
sizeof TimeZone_handlers);
TimeZone_handlers.offset = XtOffsetOf(TimeZone_object, zo);
TimeZone_handlers.clone_obj = TimeZone_clone_obj;
diff --git a/ext/intl/transliterator/transliterator_class.c b/ext/intl/transliterator/transliterator_class.c
index 6f0544c712..24de8f6544 100644
--- a/ext/intl/transliterator/transliterator_class.c
+++ b/ext/intl/transliterator/transliterator_class.c
@@ -219,7 +219,7 @@ static zval *Transliterator_get_property_ptr_ptr( zval *object, zval *member, in
}
else
{
- retval = std_object_handlers.get_property_ptr_ptr( object, member, type, cache_slot );
+ retval = zend_std_get_property_ptr_ptr( object, member, type, cache_slot );
}
TRANSLITERATOR_PROPERTY_HANDLER_EPILOG;
@@ -244,7 +244,7 @@ static zval *Transliterator_read_property( zval *object, zval *member, int type,
}
else
{
- retval = std_object_handlers.read_property( object, member, type, cache_slot, rv );
+ retval = zend_std_read_property( object, member, type, cache_slot, rv );
}
TRANSLITERATOR_PROPERTY_HANDLER_EPILOG;
@@ -274,7 +274,7 @@ static void Transliterator_write_property( zval *object, zval *member, zval *val
}
else
{
- std_object_handlers.write_property( object, member, value, cache_slot );
+ zend_std_write_property( object, member, value, cache_slot );
}
TRANSLITERATOR_PROPERTY_HANDLER_EPILOG;
@@ -334,7 +334,7 @@ void transliterator_register_Transliterator_class( void )
INIT_CLASS_ENTRY( ce, "Transliterator", Transliterator_class_functions );
ce.create_object = Transliterator_object_create;
Transliterator_ce_ptr = zend_register_internal_class( &ce );
- memcpy( &Transliterator_handlers, zend_get_std_object_handlers(),
+ memcpy( &Transliterator_handlers, &std_object_handlers,
sizeof Transliterator_handlers );
Transliterator_handlers.offset = XtOffsetOf(Transliterator_object, zo);
Transliterator_handlers.free_obj = Transliterator_objects_free;
diff --git a/ext/mysqli/mysqli.c b/ext/mysqli/mysqli.c
index 60d9631d30..c885be61c0 100644
--- a/ext/mysqli/mysqli.c
+++ b/ext/mysqli/mysqli.c
@@ -321,8 +321,7 @@ zval *mysqli_read_property(zval *object, zval *member, int type, void **cache_sl
retval = &EG(uninitialized_zval);
}
} else {
- const zend_object_handlers *std_hnd = zend_get_std_object_handlers();
- retval = std_hnd->read_property(object, member, type, cache_slot, rv);
+ retval = zend_std_read_property(object, member, type, cache_slot, rv);
}
if (member == &tmp_member) {
@@ -354,8 +353,7 @@ void mysqli_write_property(zval *object, zval *member, zval *value, void **cache
if (hnd) {
hnd->write_func(obj, value);
} else {
- const zend_object_handlers *std_hnd = zend_get_std_object_handlers();
- std_hnd->write_property(object, member, value, cache_slot);
+ zend_std_write_property(object, member, value, cache_slot);
}
if (member == &tmp_member) {
@@ -409,8 +407,7 @@ static int mysqli_object_has_property(zval *object, zval *member, int has_set_ex
php_error_docref(NULL, E_WARNING, "Invalid value for has_set_exists");
}
} else {
- const zend_object_handlers *std_hnd = zend_get_std_object_handlers();
- ret = std_hnd->has_property(object, member, has_set_exists, cache_slot);
+ ret = zend_std_has_property(object, member, has_set_exists, cache_slot);
}
return ret;
@@ -561,7 +558,6 @@ static PHP_GINIT_FUNCTION(mysqli)
PHP_MINIT_FUNCTION(mysqli)
{
zend_class_entry *ce,cex;
- const zend_object_handlers *std_hnd = zend_get_std_object_handlers();
REGISTER_INI_ENTRIES();
#ifndef MYSQLI_USE_MYSQLND
@@ -570,13 +566,12 @@ PHP_MINIT_FUNCTION(mysqli)
}
#endif
- memcpy(&mysqli_object_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
+ memcpy(&mysqli_object_handlers, &std_object_handlers, sizeof(zend_object_handlers));
mysqli_object_handlers.offset = XtOffsetOf(mysqli_object, zo);
mysqli_object_handlers.free_obj = mysqli_objects_free_storage;
mysqli_object_handlers.clone_obj = NULL;
mysqli_object_handlers.read_property = mysqli_read_property;
mysqli_object_handlers.write_property = mysqli_write_property;
- mysqli_object_handlers.get_property_ptr_ptr = std_hnd->get_property_ptr_ptr;
mysqli_object_handlers.has_property = mysqli_object_has_property;
mysqli_object_handlers.get_debug_info = mysqli_object_get_debug_info;
memcpy(&mysqli_object_driver_handlers, &mysqli_object_handlers, sizeof(zend_object_handlers));
diff --git a/ext/pdo/pdo_dbh.c b/ext/pdo/pdo_dbh.c
index 3428b6386c..d4453c5012 100644
--- a/ext/pdo/pdo_dbh.c
+++ b/ext/pdo/pdo_dbh.c
@@ -423,7 +423,7 @@ static void pdo_stmt_construct(zend_execute_data *execute_data, pdo_stmt_t *stmt
ZVAL_STRINGL(&query_string, stmt->query_string, stmt->query_stringlen);
ZVAL_STRINGL(&z_key, "queryString", sizeof("queryString") - 1);
- std_object_handlers.write_property(object, &z_key, &query_string, NULL);
+ zend_std_write_property(object, &z_key, &query_string, NULL);
zval_ptr_dtor(&query_string);
zval_ptr_dtor(&z_key);
@@ -1343,7 +1343,7 @@ static union _zend_function *dbh_method_get(zend_object **object, zend_string *m
pdo_dbh_object_t *dbh_obj = php_pdo_dbh_fetch_object(*object);
zend_string *lc_method_name;
- if ((fbc = std_object_handlers.get_method(object, method_name, key)) == NULL) {
+ if ((fbc = zend_std_get_method(object, method_name, key)) == NULL) {
/* not a pre-defined method, nor a user-defined method; check
* the driver specific methods */
if (!dbh_obj->inner->cls_methods[PDO_DBH_DRIVER_METHOD_KIND_DBH]) {
diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c
index b1b58b4cc6..94bb02d4b0 100644
--- a/ext/pdo/pdo_stmt.c
+++ b/ext/pdo/pdo_stmt.c
@@ -2198,7 +2198,7 @@ static void dbstmt_prop_write(zval *object, zval *member, zval *value, void **ca
if (strcmp(Z_STRVAL_P(member), "queryString") == 0) {
pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "property queryString is read only");
} else {
- std_object_handlers.write_property(object, member, value, cache_slot);
+ zend_std_write_property(object, member, value, cache_slot);
}
}
@@ -2211,7 +2211,7 @@ static void dbstmt_prop_delete(zval *object, zval *member, void **cache_slot)
if (strcmp(Z_STRVAL_P(member), "queryString") == 0) {
pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "property queryString is read only");
} else {
- std_object_handlers.unset_property(object, member, cache_slot);
+ zend_std_unset_property(object, member, cache_slot);
}
}
@@ -2248,7 +2248,7 @@ static union _zend_function *dbstmt_method_get(zend_object **object_pp, zend_str
out:
zend_string_release_ex(lc_method_name, 0);
if (!fbc) {
- fbc = std_object_handlers.get_method(object_pp, method_name, key);
+ fbc = zend_std_get_method(object_pp, method_name, key);
}
return fbc;
}
@@ -2528,7 +2528,7 @@ static zval *row_prop_read(zval *object, zval *member, int type, void **cache_sl
if (strcmp(Z_STRVAL_P(member), "queryString") == 0) {
ZVAL_OBJ(&zobj, &stmt->std);
//zval_ptr_dtor(rv);
- return std_object_handlers.read_property(&zobj, member, type, cache_slot, rv);
+ return zend_std_read_property(&zobj, member, type, cache_slot, rv);
}
}
}
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
index 5e71aa38f9..3cb394bdcc 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -6688,8 +6688,6 @@ static const zend_function_entry reflection_ext_functions[] = { /* {{{ */
PHP_FE_END
}; /* }}} */
-static const zend_object_handlers *zend_std_obj_handlers;
-
/* {{{ _reflection_write_property */
static void _reflection_write_property(zval *object, zval *member, zval *value, void **cache_slot)
{
@@ -6703,7 +6701,7 @@ static void _reflection_write_property(zval *object, zval *member, zval *value,
}
else
{
- zend_std_obj_handlers->write_property(object, member, value, cache_slot);
+ zend_std_write_property(object, member, value, cache_slot);
}
}
/* }}} */
@@ -6712,8 +6710,7 @@ PHP_MINIT_FUNCTION(reflection) /* {{{ */
{
zend_class_entry _reflection_entry;
- zend_std_obj_handlers = zend_get_std_object_handlers();
- memcpy(&reflection_object_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
+ memcpy(&reflection_object_handlers, &std_object_handlers, sizeof(zend_object_handlers));
reflection_object_handlers.offset = XtOffsetOf(reflection_object, zo);
reflection_object_handlers.free_obj = reflection_free_objects_storage;
reflection_object_handlers.clone_obj = NULL;
diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c
index 605c9e883e..f346d5af13 100644
--- a/ext/simplexml/simplexml.c
+++ b/ext/simplexml/simplexml.c
@@ -2689,7 +2689,7 @@ PHP_MINIT_FUNCTION(simplexml)
sxe_class_entry->iterator_funcs.funcs = &php_sxe_iterator_funcs;
zend_class_implements(sxe_class_entry, 1, zend_ce_traversable);
- memcpy(&sxe_object_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
+ memcpy(&sxe_object_handlers, &std_object_handlers, sizeof(zend_object_handlers));
sxe_object_handlers.offset = XtOffsetOf(php_sxe_object, zo);
sxe_object_handlers.dtor_obj = sxe_object_dtor;
sxe_object_handlers.free_obj = sxe_object_free_storage;
diff --git a/ext/snmp/snmp.c b/ext/snmp/snmp.c
index 0bdbcdf80b..a424912a24 100644
--- a/ext/snmp/snmp.c
+++ b/ext/snmp/snmp.c
@@ -1938,8 +1938,7 @@ zval *php_snmp_read_property(zval *object, zval *member, int type, void **cache_
retval = &EG(uninitialized_zval);
}
} else {
- const zend_object_handlers * std_hnd = zend_get_std_object_handlers();
- retval = std_hnd->read_property(object, member, type, cache_slot, rv);
+ retval = zend_std_read_property(object, member, type, cache_slot, rv);
}
if (member == &tmp_member) {
@@ -1976,8 +1975,7 @@ void php_snmp_write_property(zval *object, zval *member, zval *value, void **cac
}
*/
} else {
- const zend_object_handlers * std_hnd = zend_get_std_object_handlers();
- std_hnd->write_property(object, member, value, cache_slot);
+ zend_std_write_property(object, member, value, cache_slot);
}
if (member == &tmp_member) {
@@ -2017,8 +2015,7 @@ static int php_snmp_has_property(zval *object, zval *member, int has_set_exists,
}
}
} else {
- const zend_object_handlers *std_hnd = zend_get_std_object_handlers();
- ret = std_hnd->has_property(object, member, has_set_exists, cache_slot);
+ ret = zend_std_has_property(object, member, has_set_exists, cache_slot);
}
return ret;
}
@@ -2279,7 +2276,7 @@ PHP_MINIT_FUNCTION(snmp)
logh->pri_max = LOG_ERR;
}
- memcpy(&php_snmp_object_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
+ memcpy(&php_snmp_object_handlers, &std_object_handlers, sizeof(zend_object_handlers));
php_snmp_object_handlers.read_property = php_snmp_read_property;
php_snmp_object_handlers.write_property = php_snmp_write_property;
php_snmp_object_handlers.has_property = php_snmp_has_property;
diff --git a/ext/spl/spl_array.c b/ext/spl/spl_array.c
index 26bb6b1164..3b9ee1a80a 100644
--- a/ext/spl/spl_array.c
+++ b/ext/spl/spl_array.c
@@ -873,10 +873,10 @@ static zval *spl_array_read_property(zval *object, zval *member, int type, void
spl_array_object *intern = Z_SPLARRAY_P(object);
if ((intern->ar_flags & SPL_ARRAY_ARRAY_AS_PROPS) != 0
- && !std_object_handlers.has_property(object, member, 2, NULL)) {
+ && !zend_std_has_property(object, member, 2, NULL)) {
return spl_array_read_dimension(object, member, type, rv);
}
- return std_object_handlers.read_property(object, member, type, cache_slot, rv);
+ return zend_std_read_property(object, member, type, cache_slot, rv);
} /* }}} */
static void spl_array_write_property(zval *object, zval *member, zval *value, void **cache_slot) /* {{{ */
@@ -884,11 +884,11 @@ static void spl_array_write_property(zval *object, zval *member, zval *value, vo
spl_array_object *intern = Z_SPLARRAY_P(object);
if ((intern->ar_flags & SPL_ARRAY_ARRAY_AS_PROPS) != 0
- && !std_object_handlers.has_property(object, member, 2, NULL)) {
+ && !zend_std_has_property(object, member, 2, NULL)) {
spl_array_write_dimension(object, member, value);
return;
}
- std_object_handlers.write_property(object, member, value, cache_slot);
+ zend_std_write_property(object, member, value, cache_slot);
} /* }}} */
static zval *spl_array_get_property_ptr_ptr(zval *object, zval *member, int type, void **cache_slot) /* {{{ */
@@ -896,7 +896,7 @@ static zval *spl_array_get_property_ptr_ptr(zval *object, zval *member, int type
spl_array_object *intern = Z_SPLARRAY_P(object);
if ((intern->ar_flags & SPL_ARRAY_ARRAY_AS_PROPS) != 0
- && !std_object_handlers.has_property(object, member, 2, NULL)) {
+ && !zend_std_has_property(object, member, 2, NULL)) {
/* If object has offsetGet() overridden, then fallback to read_property,
* which will call offsetGet(). */
if (intern->fptr_offset_get) {
@@ -904,7 +904,7 @@ static zval *spl_array_get_property_ptr_ptr(zval *object, zval *member, int type
}
return spl_array_get_dimension_ptr(1, intern, member, type);
}
- return std_object_handlers.get_property_ptr_ptr(object, member, type, cache_slot);
+ return zend_std_get_property_ptr_ptr(object, member, type, cache_slot);
} /* }}} */
static int spl_array_has_property(zval *object, zval *member, int has_set_exists, void **cache_slot) /* {{{ */
@@ -912,10 +912,10 @@ static int spl_array_has_property(zval *object, zval *member, int has_set_exists
spl_array_object *intern = Z_SPLARRAY_P(object);
if ((intern->ar_flags & SPL_ARRAY_ARRAY_AS_PROPS) != 0
- && !std_object_handlers.has_property(object, member, 2, NULL)) {
+ && !zend_std_has_property(object, member, 2, NULL)) {
return spl_array_has_dimension(object, member, has_set_exists);
}
- return std_object_handlers.has_property(object, member, has_set_exists, cache_slot);
+ return zend_std_has_property(object, member, has_set_exists, cache_slot);
} /* }}} */
static void spl_array_unset_property(zval *object, zval *member, void **cache_slot) /* {{{ */
@@ -923,11 +923,11 @@ static void spl_array_unset_property(zval *object, zval *member, void **cache_sl
spl_array_object *intern = Z_SPLARRAY_P(object);
if ((intern->ar_flags & SPL_ARRAY_ARRAY_AS_PROPS) != 0
- && !std_object_handlers.has_property(object, member, 2, NULL)) {
+ && !zend_std_has_property(object, member, 2, NULL)) {
spl_array_unset_dimension(object, member);
return;
}
- std_object_handlers.unset_property(object, member, cache_slot);
+ zend_std_unset_property(object, member, cache_slot);
} /* }}} */
static int spl_array_compare_objects(zval *o1, zval *o2) /* {{{ */
@@ -947,7 +947,7 @@ static int spl_array_compare_objects(zval *o1, zval *o2) /* {{{ */
/* if we just compared std.properties, don't do it again */
if (result == 0 &&
!(ht1 == intern1->std.properties && ht2 == intern2->std.properties)) {
- result = std_object_handlers.compare_objects(o1, o2);
+ result = zend_std_compare_objects(o1, o2);
}
return result;
} /* }}} */
@@ -1141,7 +1141,7 @@ static void spl_array_set_array(zval *object, spl_array_object *intern, zval *ar
}
} else {
zend_object_get_properties_t handler = Z_OBJ_HANDLER_P(array, get_properties);
- if (handler != std_object_handlers.get_properties) {
+ if (handler != zend_std_get_properties) {
zend_throw_exception_ex(spl_ce_InvalidArgumentException, 0,
"Overloaded object of type %s is not compatible with %s",
ZSTR_VAL(Z_OBJCE_P(array)->name), ZSTR_VAL(intern->std.ce->name));
@@ -2006,7 +2006,7 @@ PHP_MINIT_FUNCTION(spl_array)
REGISTER_SPL_IMPLEMENTS(ArrayObject, ArrayAccess);
REGISTER_SPL_IMPLEMENTS(ArrayObject, Serializable);
REGISTER_SPL_IMPLEMENTS(ArrayObject, Countable);
- memcpy(&spl_handler_ArrayObject, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
+ memcpy(&spl_handler_ArrayObject, &std_object_handlers, sizeof(zend_object_handlers));
spl_handler_ArrayObject.offset = XtOffsetOf(spl_array_object, std);
diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c
index 3c3a0012dc..e844ca03a2 100644
--- a/ext/spl/spl_directory.c
+++ b/ext/spl/spl_directory.c
@@ -678,12 +678,12 @@ zend_function *spl_filesystem_object_get_method_check(zend_object **object, zend
if (fsobj->u.dir.dirp == NULL && fsobj->orig_path == NULL) {
zend_function *func;
zend_string *tmp = zend_string_init("_bad_state_ex", sizeof("_bad_state_ex") - 1, 0);
- func = zend_get_std_object_handlers()->get_method(object, tmp, NULL);
+ func = zend_std_get_method(object, tmp, NULL);
zend_string_release_ex(tmp, 0);
return func;
}
- return zend_get_std_object_handlers()->get_method(object, method, key);
+ return zend_std_get_method(object, method, key);
}
/* }}} */
@@ -1858,7 +1858,7 @@ static int spl_filesystem_object_cast(zval *readobj, zval *writeobj, int type)
if (type == IS_STRING) {
if (Z_OBJCE_P(readobj)->__tostring) {
- return std_object_handlers.cast_object(readobj, writeobj, type);
+ return zend_std_cast_object_tostring(readobj, writeobj, type);
}
switch (intern->type) {
@@ -3099,7 +3099,7 @@ static const zend_function_entry spl_SplTempFileObject_functions[] = {
PHP_MINIT_FUNCTION(spl_directory)
{
REGISTER_SPL_STD_CLASS_EX(SplFileInfo, spl_filesystem_object_new, spl_SplFileInfo_functions);
- memcpy(&spl_filesystem_object_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
+ memcpy(&spl_filesystem_object_handlers, &std_object_handlers, sizeof(zend_object_handlers));
spl_filesystem_object_handlers.offset = XtOffsetOf(spl_filesystem_object, std);
spl_filesystem_object_handlers.clone_obj = spl_filesystem_object_clone;
spl_filesystem_object_handlers.cast_object = spl_filesystem_object_cast;
diff --git a/ext/spl/spl_dllist.c b/ext/spl/spl_dllist.c
index 20cf6abcbc..55e3c0072a 100644
--- a/ext/spl/spl_dllist.c
+++ b/ext/spl/spl_dllist.c
@@ -1387,7 +1387,7 @@ static const zend_function_entry spl_funcs_SplDoublyLinkedList[] = {
PHP_MINIT_FUNCTION(spl_dllist) /* {{{ */
{
REGISTER_SPL_STD_CLASS_EX(SplDoublyLinkedList, spl_dllist_object_new, spl_funcs_SplDoublyLinkedList);
- memcpy(&spl_handler_SplDoublyLinkedList, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
+ memcpy(&spl_handler_SplDoublyLinkedList, &std_object_handlers, sizeof(zend_object_handlers));
spl_handler_SplDoublyLinkedList.offset = XtOffsetOf(spl_dllist_object, std);
spl_handler_SplDoublyLinkedList.clone_obj = spl_dllist_object_clone;
diff --git a/ext/spl/spl_fixedarray.c b/ext/spl/spl_fixedarray.c
index 7e3e4c23d6..3690ce6c38 100644
--- a/ext/spl/spl_fixedarray.c
+++ b/ext/spl/spl_fixedarray.c
@@ -1074,7 +1074,7 @@ static const zend_function_entry spl_funcs_SplFixedArray[] = { /* {{{ */
PHP_MINIT_FUNCTION(spl_fixedarray)
{
REGISTER_SPL_STD_CLASS_EX(SplFixedArray, spl_fixedarray_new, spl_funcs_SplFixedArray);
- memcpy(&spl_handler_SplFixedArray, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
+ memcpy(&spl_handler_SplFixedArray, &std_object_handlers, sizeof(zend_object_handlers));
spl_handler_SplFixedArray.offset = XtOffsetOf(spl_fixedarray_object, std);
spl_handler_SplFixedArray.clone_obj = spl_fixedarray_object_clone;
diff --git a/ext/spl/spl_heap.c b/ext/spl/spl_heap.c
index 3031a5028b..70370b1665 100644
--- a/ext/spl/spl_heap.c
+++ b/ext/spl/spl_heap.c
@@ -524,7 +524,7 @@ static HashTable *spl_heap_object_get_gc(zval *obj, zval **gc_data, int *gc_data
*gc_data = intern->heap->elements;
*gc_data_count = intern->heap->count;
- return std_object_handlers.get_properties(obj);
+ return zend_std_get_properties(obj);
}
/* }}} */
@@ -1199,7 +1199,7 @@ static const zend_function_entry spl_funcs_SplHeap[] = {
PHP_MINIT_FUNCTION(spl_heap) /* {{{ */
{
REGISTER_SPL_STD_CLASS_EX(SplHeap, spl_heap_object_new, spl_funcs_SplHeap);
- memcpy(&spl_handler_SplHeap, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
+ memcpy(&spl_handler_SplHeap, &std_object_handlers, sizeof(zend_object_handlers));
spl_handler_SplHeap.offset = XtOffsetOf(spl_heap_object, std);
spl_handler_SplHeap.clone_obj = spl_heap_object_clone;
@@ -1221,7 +1221,7 @@ PHP_MINIT_FUNCTION(spl_heap) /* {{{ */
spl_ce_SplMinHeap->get_iterator = spl_heap_get_iterator;
REGISTER_SPL_STD_CLASS_EX(SplPriorityQueue, spl_heap_object_new, spl_funcs_SplPriorityQueue);
- memcpy(&spl_handler_SplPriorityQueue, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
+ memcpy(&spl_handler_SplPriorityQueue, &std_object_handlers, sizeof(zend_object_handlers));
spl_handler_SplPriorityQueue.offset = XtOffsetOf(spl_heap_object, std);
spl_handler_SplPriorityQueue.clone_obj = spl_heap_object_clone;
diff --git a/ext/spl/spl_iterators.c b/ext/spl/spl_iterators.c
index 9e6d10f930..3dcdf1da14 100644
--- a/ext/spl/spl_iterators.c
+++ b/ext/spl/spl_iterators.c
@@ -899,7 +899,7 @@ static union _zend_function *spl_recursive_it_get_method(zend_object **zobject,
}
zobj = &object->iterators[level].zobject;
- function_handler = std_object_handlers.get_method(zobject, method, key);
+ function_handler = zend_std_get_method(zobject, method, key);
if (!function_handler) {
if ((function_handler = zend_hash_find_ptr(&Z_OBJCE_P(zobj)->function_table, method)) == NULL) {
if (Z_OBJ_HT_P(zobj)->get_method) {
@@ -1377,7 +1377,7 @@ static union _zend_function *spl_dual_it_get_method(zend_object **object, zend_s
intern = spl_dual_it_from_obj(*object);
- function_handler = std_object_handlers.get_method(object, method, key);
+ function_handler = zend_std_get_method(object, method, key);
if (!function_handler && intern->inner.ce) {
if ((function_handler = zend_hash_find_ptr(&intern->inner.ce->function_table, method)) == NULL) {
if (Z_OBJ_HT(intern->inner.zobject)->get_method) {
@@ -3709,14 +3709,14 @@ PHP_MINIT_FUNCTION(spl_iterators)
REGISTER_SPL_STD_CLASS_EX(RecursiveIteratorIterator, spl_RecursiveIteratorIterator_new, spl_funcs_RecursiveIteratorIterator);
REGISTER_SPL_ITERATOR(RecursiveIteratorIterator);
- memcpy(&spl_handlers_rec_it_it, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
+ memcpy(&spl_handlers_rec_it_it, &std_object_handlers, sizeof(zend_object_handlers));
spl_handlers_rec_it_it.offset = XtOffsetOf(spl_recursive_it_object, std);
spl_handlers_rec_it_it.get_method = spl_recursive_it_get_method;
spl_handlers_rec_it_it.clone_obj = NULL;
spl_handlers_rec_it_it.dtor_obj = spl_RecursiveIteratorIterator_dtor;
spl_handlers_rec_it_it.free_obj = spl_RecursiveIteratorIterator_free_storage;
- memcpy(&spl_handlers_dual_it, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
+ memcpy(&spl_handlers_dual_it, &std_object_handlers, sizeof(zend_object_handlers));
spl_handlers_dual_it.offset = XtOffsetOf(spl_dual_it_object, std);
spl_handlers_dual_it.get_method = spl_dual_it_get_method;
/*spl_handlers_dual_it.call_method = spl_dual_it_call_method;*/
diff --git a/ext/spl/spl_observer.c b/ext/spl/spl_observer.c
index 2dd3e17896..6d81b9326f 100644
--- a/ext/spl/spl_observer.c
+++ b/ext/spl/spl_observer.c
@@ -340,7 +340,7 @@ static HashTable *spl_object_storage_get_gc(zval *obj, zval **table, int *n) /*
*table = intern->gcdata;
*n = i;
- return std_object_handlers.get_properties(obj);
+ return zend_std_get_properties(obj);
}
/* }}} */
@@ -1244,7 +1244,7 @@ PHP_MINIT_FUNCTION(spl_observer)
REGISTER_SPL_INTERFACE(SplSubject);
REGISTER_SPL_STD_CLASS_EX(SplObjectStorage, spl_SplObjectStorage_new, spl_funcs_SplObjectStorage);
- memcpy(&spl_handler_SplObjectStorage, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
+ memcpy(&spl_handler_SplObjectStorage, &std_object_handlers, sizeof(zend_object_handlers));
spl_handler_SplObjectStorage.offset = XtOffsetOf(spl_SplObjectStorage, std);
spl_handler_SplObjectStorage.get_debug_info = spl_object_storage_debug_info;
diff --git a/ext/sqlite3/sqlite3.c b/ext/sqlite3/sqlite3.c
index 1327c2056a..2a3ec854ed 100644
--- a/ext/sqlite3/sqlite3.c
+++ b/ext/sqlite3/sqlite3.c
@@ -2278,9 +2278,9 @@ PHP_MINIT_FUNCTION(sqlite3)
}
#endif
- memcpy(&sqlite3_object_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
- memcpy(&sqlite3_stmt_object_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
- memcpy(&sqlite3_result_object_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
+ memcpy(&sqlite3_object_handlers, &std_object_handlers, sizeof(zend_object_handlers));
+ memcpy(&sqlite3_stmt_object_handlers, &std_object_handlers, sizeof(zend_object_handlers));
+ memcpy(&sqlite3_result_object_handlers, &std_object_handlers, sizeof(zend_object_handlers));
/* Register SQLite 3 Class */
INIT_CLASS_ENTRY(ce, "SQLite3", php_sqlite3_class_methods);
diff --git a/ext/tidy/tidy.c b/ext/tidy/tidy.c
index 365d037eb5..2c2c278eb5 100644
--- a/ext/tidy/tidy.c
+++ b/ext/tidy/tidy.c
@@ -101,7 +101,7 @@
ce.create_object = tidy_object_new_ ## name; \
tidy_ce_ ## name = zend_register_internal_class_ex(&ce, parent); \
tidy_ce_ ## name->ce_flags |= __flags; \
- memcpy(&tidy_object_handlers_ ## name, zend_get_std_object_handlers(), sizeof(zend_object_handlers)); \
+ memcpy(&tidy_object_handlers_ ## name, &std_object_handlers, sizeof(zend_object_handlers)); \
tidy_object_handlers_ ## name.clone_obj = NULL; \
}
diff --git a/ext/xmlreader/php_xmlreader.c b/ext/xmlreader/php_xmlreader.c
index a329cca29b..0b84a702b8 100644
--- a/ext/xmlreader/php_xmlreader.c
+++ b/ext/xmlreader/php_xmlreader.c
@@ -122,7 +122,6 @@ zval *xmlreader_get_property_ptr_ptr(zval *object, zval *member, int type, void
zval tmp_member;
zval *retval = NULL;
xmlreader_prop_handler *hnd = NULL;
- const zend_object_handlers *std_hnd;
if (Z_TYPE_P(member) != IS_STRING) {
ZVAL_STR(&tmp_member, zval_get_string_func(member));
@@ -136,8 +135,7 @@ zval *xmlreader_get_property_ptr_ptr(zval *object, zval *member, int type, void
}
if (hnd == NULL) {
- std_hnd = zend_get_std_object_handlers();
- retval = std_hnd->get_property_ptr_ptr(object, member, type, cache_slot);
+ retval = zend_std_get_property_ptr_ptr(object, member, type, cache_slot);
}
if (member == &tmp_member) {
@@ -155,7 +153,6 @@ zval *xmlreader_read_property(zval *object, zval *member, int type, void **cache
zval tmp_member;
zval *retval = NULL;
xmlreader_prop_handler *hnd = NULL;
- const zend_object_handlers *std_hnd;
if (Z_TYPE_P(member) != IS_STRING) {
ZVAL_STR(&tmp_member, zval_get_string_func(member));
@@ -175,8 +172,7 @@ zval *xmlreader_read_property(zval *object, zval *member, int type, void **cache
retval = rv;
}
} else {
- std_hnd = zend_get_std_object_handlers();
- retval = std_hnd->read_property(object, member, type, cache_slot, rv);
+ retval = zend_std_read_property(object, member, type, cache_slot, rv);
}
if (member == &tmp_member) {
@@ -192,7 +188,6 @@ void xmlreader_write_property(zval *object, zval *member, zval *value, void **ca
xmlreader_object *obj;
zval tmp_member;
xmlreader_prop_handler *hnd = NULL;
- const zend_object_handlers *std_hnd;
if (Z_TYPE_P(member) != IS_STRING) {
ZVAL_STR(&tmp_member, zval_get_string_func(member));
@@ -207,8 +202,7 @@ void xmlreader_write_property(zval *object, zval *member, zval *value, void **ca
if (hnd != NULL) {
php_error_docref(NULL, E_WARNING, "Cannot write to read-only property");
} else {
- std_hnd = zend_get_std_object_handlers();
- std_hnd->write_property(object, member, value, cache_slot);
+ zend_std_write_property(object, member, value, cache_slot);
}
if (member == &tmp_member) {
@@ -1303,7 +1297,7 @@ PHP_MINIT_FUNCTION(xmlreader)
zend_class_entry ce;
- memcpy(&xmlreader_object_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
+ memcpy(&xmlreader_object_handlers, &std_object_handlers, sizeof(zend_object_handlers));
xmlreader_object_handlers.offset = XtOffsetOf(xmlreader_object, std);
xmlreader_object_handlers.dtor_obj = zend_objects_destroy_object;
xmlreader_object_handlers.free_obj = xmlreader_objects_free_storage;
diff --git a/ext/xmlwriter/php_xmlwriter.c b/ext/xmlwriter/php_xmlwriter.c
index 54480101b5..70a3cb6fc0 100644
--- a/ext/xmlwriter/php_xmlwriter.c
+++ b/ext/xmlwriter/php_xmlwriter.c
@@ -1842,7 +1842,7 @@ static PHP_MINIT_FUNCTION(xmlwriter)
zend_class_entry ce;
le_xmlwriter = zend_register_list_destructors_ex(xmlwriter_dtor, NULL, "xmlwriter", module_number);
- memcpy(&xmlwriter_object_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
+ memcpy(&xmlwriter_object_handlers, &std_object_handlers, sizeof(zend_object_handlers));
xmlwriter_object_handlers.offset = XtOffsetOf(ze_xmlwriter_object, std);
xmlwriter_object_handlers.free_obj = xmlwriter_object_free_storage;
xmlwriter_object_handlers.clone_obj = NULL;
diff --git a/ext/xsl/php_xsl.c b/ext/xsl/php_xsl.c
index faa3fe488e..5e485c9c91 100644
--- a/ext/xsl/php_xsl.c
+++ b/ext/xsl/php_xsl.c
@@ -128,7 +128,7 @@ PHP_MINIT_FUNCTION(xsl)
zend_class_entry ce;
- memcpy(&xsl_object_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
+ memcpy(&xsl_object_handlers, &std_object_handlers, sizeof(zend_object_handlers));
xsl_object_handlers.offset = XtOffsetOf(xsl_object, std);
xsl_object_handlers.clone_obj = NULL;
xsl_object_handlers.free_obj = xsl_objects_free_storage;
diff --git a/ext/xsl/xsltprocessor.c b/ext/xsl/xsltprocessor.c
index bde382ad1b..17536c5cbe 100644
--- a/ext/xsl/xsltprocessor.c
+++ b/ext/xsl/xsltprocessor.c
@@ -399,7 +399,6 @@ PHP_FUNCTION(xsl_xsltprocessor_import_stylesheet)
xsl_object *intern;
int prevSubstValue, prevExtDtdValue, clone_docu = 0;
xmlNode *nodep = NULL;
- const zend_object_handlers *std_hnd;
zval *cloneDocu, member, rv;
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "Oo", &id, xsl_xsltprocessor_class_entry, &docp) == FAILURE) {
@@ -435,9 +434,8 @@ PHP_FUNCTION(xsl_xsltprocessor_import_stylesheet)
intern = Z_XSL_P(id);
- std_hnd = zend_get_std_object_handlers();
ZVAL_STRING(&member, "cloneDocument");
- cloneDocu = std_hnd->read_property(id, &member, BP_VAR_IS, NULL, &rv);
+ cloneDocu = zend_std_read_property(id, &member, BP_VAR_IS, NULL, &rv);
if (Z_TYPE_P(cloneDocu) != IS_NULL) {
convert_to_long(cloneDocu);
clone_docu = Z_LVAL_P(cloneDocu);
@@ -483,7 +481,6 @@ static xmlDocPtr php_xsl_apply_stylesheet(zval *id, xsl_object *intern, xsltStyl
char **params = NULL;
int clone;
zval *doXInclude, member, rv;
- const zend_object_handlers *std_hnd;
FILE *f;
int secPrefsError = 0;
int secPrefsValue;
@@ -533,10 +530,8 @@ static xmlDocPtr php_xsl_apply_stylesheet(zval *id, xsl_object *intern, xsltStyl
ctxt = xsltNewTransformContext(style, doc);
ctxt->_private = (void *) intern;
- std_hnd = zend_get_std_object_handlers();
-
ZVAL_STRING(&member, "doXInclude");
- doXInclude = std_hnd->read_property(id, &member, BP_VAR_IS, NULL, &rv);
+ doXInclude = zend_std_read_property(id, &member, BP_VAR_IS, NULL, &rv);
if (Z_TYPE_P(doXInclude) != IS_NULL) {
convert_to_long(doXInclude);
ctxt->xinclude = Z_LVAL_P(doXInclude);
diff --git a/ext/zend_test/test.c b/ext/zend_test/test.c
index 0fda9649df..f5bc17b8cf 100644
--- a/ext/zend_test/test.c
+++ b/ext/zend_test/test.c
@@ -192,7 +192,7 @@ PHP_MINIT_FUNCTION(zend_test)
zend_test_class->create_object = zend_test_class_new;
zend_test_class->get_static_method = zend_test_class_static_method_get;
- memcpy(&zend_test_class_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
+ memcpy(&zend_test_class_handlers, &std_object_handlers, sizeof(zend_object_handlers));
zend_test_class_handlers.get_method = zend_test_class_method_get;
zend_test_class_handlers.call_method = zend_test_class_call_method;
diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c
index a98c8cc555..0aaef7d21a 100644
--- a/ext/zip/php_zip.c
+++ b/ext/zip/php_zip.c
@@ -878,7 +878,6 @@ static zval *php_zip_get_property_ptr_ptr(zval *object, zval *member, int type,
zval tmp_member;
zval *retval = NULL;
zip_prop_handler *hnd = NULL;
- const zend_object_handlers *std_hnd;
if (Z_TYPE_P(member) != IS_STRING) {
ZVAL_STR(&tmp_member, zval_get_string_func(member));
@@ -893,8 +892,7 @@ static zval *php_zip_get_property_ptr_ptr(zval *object, zval *member, int type,
}
if (hnd == NULL) {
- std_hnd = zend_get_std_object_handlers();
- retval = std_hnd->get_property_ptr_ptr(object, member, type, cache_slot);
+ retval = zend_std_get_property_ptr_ptr(object, member, type, cache_slot);
}
if (member == &tmp_member) {
@@ -911,7 +909,6 @@ static zval *php_zip_read_property(zval *object, zval *member, int type, void **
zval tmp_member;
zval *retval = NULL;
zip_prop_handler *hnd = NULL;
- const zend_object_handlers *std_hnd;
if (Z_TYPE_P(member) != IS_STRING) {
ZVAL_STR(&tmp_member, zval_get_string_func(member));
@@ -931,8 +928,7 @@ static zval *php_zip_read_property(zval *object, zval *member, int type, void **
retval = &EG(uninitialized_zval);
}
} else {
- std_hnd = zend_get_std_object_handlers();
- retval = std_hnd->read_property(object, member, type, cache_slot, rv);
+ retval = zend_std_read_property(object, member, type, cache_slot, rv);
}
if (member == &tmp_member) {
@@ -948,7 +944,6 @@ static int php_zip_has_property(zval *object, zval *member, int type, void **cac
ze_zip_object *obj;
zval tmp_member;
zip_prop_handler *hnd = NULL;
- const zend_object_handlers *std_hnd;
int retval = 0;
if (Z_TYPE_P(member) != IS_STRING) {
@@ -978,8 +973,7 @@ static int php_zip_has_property(zval *object, zval *member, int type, void **cac
zval_ptr_dtor(&tmp);
} else {
- std_hnd = zend_get_std_object_handlers();
- retval = std_hnd->has_property(object, member, type, cache_slot);
+ retval = zend_std_has_property(object, member, type, cache_slot);
}
if (member == &tmp_member) {
@@ -3156,7 +3150,7 @@ static PHP_MINIT_FUNCTION(zip)
{
zend_class_entry ce;
- memcpy(&zip_object_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
+ memcpy(&zip_object_handlers, &std_object_handlers, sizeof(zend_object_handlers));
zip_object_handlers.offset = XtOffsetOf(ze_zip_object, zo);
zip_object_handlers.free_obj = php_zip_object_free_storage;
zip_object_handlers.clone_obj = NULL;