diff options
author | Marcus Boerger <helly@php.net> | 2003-05-27 00:14:04 +0000 |
---|---|---|
committer | Marcus Boerger <helly@php.net> | 2003-05-27 00:14:04 +0000 |
commit | e525904c8ea5c9dba2f79b58a4a99db6df0f623c (patch) | |
tree | f3bbb5acc523c886c330f8ae1533a26316efa70e /ext/spl/spl_functions.c | |
parent | 61e09677b26a963f96f4a417f968042f7047f2d2 (diff) | |
download | php-git-e525904c8ea5c9dba2f79b58a4a99db6df0f623c.tar.gz |
For now that works.
# However some of the register stuff must be moved to the engine.
# And inside the engine some fixes are needed, too.
Diffstat (limited to 'ext/spl/spl_functions.c')
-rwxr-xr-x | ext/spl/spl_functions.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/ext/spl/spl_functions.c b/ext/spl/spl_functions.c index c8a98a0cbb..9337a895b3 100755 --- a/ext/spl/spl_functions.c +++ b/ext/spl/spl_functions.c @@ -100,13 +100,20 @@ void spl_register_parent_ce(zend_class_entry * class_entry, zend_class_entry * p } /* }}} */ +/* {{{ spl_inherit method */ +static void spl_inherit_method(zend_function *function) +{ + function_add_ref(function); +} +/* }}} */ + /* {{{ spl_register_implement */ void spl_register_implement(zend_class_entry * class_entry, zend_class_entry * interface_entry TSRMLS_DC) { zend_uint num_interfaces = ++class_entry->num_interfaces; class_entry->interfaces = (zend_class_entry **) realloc(class_entry->interfaces, sizeof(zend_class_entry *) * num_interfaces); class_entry->interfaces[num_interfaces-1] = interface_entry; - zend_hash_copy(&class_entry->function_table, &interface_entry->function_table, NULL, NULL, sizeof(zend_function)); + zend_hash_merge(&class_entry->function_table, &interface_entry->function_table, (copy_ctor_func_t) spl_inherit_method, NULL, sizeof(zend_function), 0); } /* }}} */ |