diff options
author | SVN Migration <svn@php.net> | 2002-09-08 15:38:45 +0000 |
---|---|---|
committer | SVN Migration <svn@php.net> | 2002-09-08 15:38:45 +0000 |
commit | e94c67742f6f4bf9fe9a381273d1ea6a16db5ec3 (patch) | |
tree | 7cb16c2c460931bbf4798a79167770dfb48ff643 /Zend/zend_compile.c | |
parent | 6c22f90b4a3d24a8da83e78f8eef97cba6c05197 (diff) | |
download | php-git-php-4.3.0dev_zend2_alpha3.tar.gz |
This commit was manufactured by cvs2svn to create tagphp-4.3.0dev_zend2_alpha3
'php_4_3_0_dev_zend2_alpha3'.
Diffstat (limited to 'Zend/zend_compile.c')
-rw-r--r-- | Zend/zend_compile.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index bb7403b0c2..34d3e87608 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -895,10 +895,6 @@ void zend_do_free(znode *op1 TSRMLS_DC) } } -#define ZEND_CLONE_FUNC_NAME "__clone" -#define ZEND_CONSTRUCTOR_FUNC_NAME "__construct" -#define ZEND_DESTRUCTOR_FUNC_NAME "__destruct" - void zend_do_begin_function_declaration(znode *function_token, znode *function_name, int is_method, int return_reference TSRMLS_DC) { zend_op_array op_array; @@ -938,6 +934,12 @@ void zend_do_begin_function_declaration(znode *function_token, znode *function_n CG(active_class_entry)->destructor = (zend_function *) CG(active_op_array); } else if ((function_name->u.constant.value.str.len == sizeof(ZEND_CLONE_FUNC_NAME)-1) && (!memcmp(function_name->u.constant.value.str.val, ZEND_CLONE_FUNC_NAME, sizeof(ZEND_CLONE_FUNC_NAME)))) { CG(active_class_entry)->clone = (zend_function *) CG(active_op_array); + } else if ((function_name->u.constant.value.str.len == sizeof(ZEND_CALL_FUNC_NAME)-1) && (!memcmp(function_name->u.constant.value.str.val, ZEND_CALL_FUNC_NAME, sizeof(ZEND_CALL_FUNC_NAME)))) { + CG(active_class_entry)->__call = (zend_function *) CG(active_op_array); + } else if ((function_name->u.constant.value.str.len == sizeof(ZEND_GET_FUNC_NAME)-1) && (!memcmp(function_name->u.constant.value.str.val, ZEND_GET_FUNC_NAME, sizeof(ZEND_GET_FUNC_NAME)))) { + CG(active_class_entry)->__get = (zend_function *) CG(active_op_array); + } else if ((function_name->u.constant.value.str.len == sizeof(ZEND_SET_FUNC_NAME)-1) && (!memcmp(function_name->u.constant.value.str.val, ZEND_SET_FUNC_NAME, sizeof(ZEND_SET_FUNC_NAME)))) { + CG(active_class_entry)->__set = (zend_function *) CG(active_op_array); } } else { zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); @@ -1501,6 +1503,9 @@ static void do_inherit_parent_constructor(zend_class_entry *ce) function_add_ref(function); } ce->constructor = ce->parent->constructor; + ce->__get = ce->parent->__get; + ce->__set = ce->parent->__set; + ce->__call = ce->parent->__call; } void zend_do_inheritance(zend_class_entry *ce, zend_class_entry *parent_ce) @@ -1551,6 +1556,9 @@ static void create_class(HashTable *class_table, char *name, int name_length, ze new_class_entry->constructor = NULL; new_class_entry->destructor = NULL; new_class_entry->clone = NULL; + new_class_entry->__get = NULL; + new_class_entry->__set = NULL; + new_class_entry->__call = NULL; new_class_entry->create_object = NULL; new_class_entry->handle_function_call = NULL; @@ -2050,6 +2058,9 @@ void zend_do_begin_class_declaration(znode *class_token, znode *class_name, znod new_class_entry->constructor = NULL; new_class_entry->destructor = NULL; new_class_entry->clone = NULL; + new_class_entry->__get = NULL; + new_class_entry->__set = NULL; + new_class_entry->__call = NULL; new_class_entry->create_object = NULL; new_class_entry->handle_function_call = NULL; |