From d48ffd97d655d979b3f6ef70c9a7a75d44dc2ed9 Mon Sep 17 00:00:00 2001 From: Stanislav Malyshev Date: Sun, 12 Jan 2003 17:16:07 +0000 Subject: [PATCH] RIP handle_* functions. ZE2 will use __ handlers instead. # Yes, I know this will break some things. I will fix those I can find shortly. --- Zend/zend.c | 6 +++--- Zend/zend.h | 2 ++ Zend/zend_compile.c | 20 ++++++-------------- 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/Zend/zend.c b/Zend/zend.c index bc52106e96..0bf3a6c846 100644 --- a/Zend/zend.c +++ b/Zend/zend.c @@ -387,9 +387,9 @@ static void register_standard_class(void) zend_standard_class_def->constructor = NULL; zend_standard_class_def->destructor = NULL; zend_standard_class_def->clone = NULL; - zend_standard_class_def->handle_function_call = NULL; - zend_standard_class_def->handle_property_get = NULL; - zend_standard_class_def->handle_property_set = NULL; + zend_standard_class_def->__call = NULL; + zend_standard_class_def->__get = NULL; + zend_standard_class_def->__set = NULL; zend_standard_class_def->refcount = 1; zend_standard_class_def->constants_updated = 0; zend_standard_class_def->ce_flags = 0; diff --git a/Zend/zend.h b/Zend/zend.h index 6c661cb215..f252eeeaf5 100644 --- a/Zend/zend.h +++ b/Zend/zend.h @@ -326,9 +326,11 @@ struct _zend_class_entry { zend_object_value (*create_object)(zend_class_entry *class_type TSRMLS_DC); /* old handlers */ +#if 0 void (*handle_function_call)(INTERNAL_FUNCTION_PARAMETERS, zend_property_reference *property_reference); zval (*handle_property_get)(zend_property_reference *property_reference); int (*handle_property_set)(zend_property_reference *property_reference, zval *value); +#endif }; diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index fe36b8807b..fcc7c41a8d 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -1621,14 +1621,14 @@ void zend_do_inheritance(zend_class_entry *ce, zend_class_entry *parent_ce) zend_hash_merge(&ce->constants_table, &parent_ce->constants_table, (void (*)(void *)) zval_add_ref, (void *) &tmp, sizeof(zval *), 0); zend_hash_merge_ex(&ce->function_table, &parent_ce->function_table, (copy_ctor_func_t) do_inherit_method, sizeof(zend_function), (zend_bool (*)(void *, void *)) do_inherit_method_check); ce->parent = parent_ce; - if (!ce->handle_property_get) { - ce->handle_property_get = parent_ce->handle_property_get; + if (!ce->__get) { + ce->__get = parent_ce->__get; } - if (!ce->handle_property_set) { - ce->handle_property_set = parent_ce->handle_property_set; + if (!ce->__set) { + ce->__set = parent_ce->__set; } - if (!ce->handle_function_call) { - ce->handle_function_call = parent_ce->handle_function_call; + if (!ce->__call) { + ce->__call = parent_ce->__call; } do_inherit_parent_constructor(ce); } @@ -1665,10 +1665,6 @@ static void create_class(HashTable *class_table, char *name, int name_length, ze new_class_entry->__call = NULL; new_class_entry->create_object = NULL; - new_class_entry->handle_function_call = NULL; - new_class_entry->handle_property_set = NULL; - new_class_entry->handle_property_get = NULL; - new_class_entry->parent = NULL; if (zend_hash_update(class_table, new_class_entry->name, name_length+1, &new_class_entry, sizeof(zend_class_entry *), NULL) == FAILURE) { @@ -2143,10 +2139,6 @@ void zend_do_begin_class_declaration(znode *class_token, znode *class_name, znod new_class_entry->__call = NULL; new_class_entry->create_object = NULL; - new_class_entry->handle_function_call = NULL; - new_class_entry->handle_property_set = NULL; - new_class_entry->handle_property_get = NULL; - new_class_entry->parent = NULL; if (parent_class_name->op_type != IS_UNUSED) { -- 2.50.1