summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2003-05-29 23:34:23 +0000
committerMarcus Boerger <helly@php.net>2003-05-29 23:34:23 +0000
commit57ceaebe8a2d4a0818e5c497a3e0cb6d89bb34d2 (patch)
treec36bc310fe55a0a7cc8d810456550a7ccb1c8c41 /ext
parent283f52f415ce644c1a1ae626d34a3f76983fd3df (diff)
downloadphp-git-57ceaebe8a2d4a0818e5c497a3e0cb6d89bb34d2.tar.gz
Make use of ze2 code
Diffstat (limited to 'ext')
-rwxr-xr-xext/spl/spl_functions.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/ext/spl/spl_functions.c b/ext/spl/spl_functions.c
index 9337a895b3..cad40e5566 100755
--- a/ext/spl/spl_functions.c
+++ b/ext/spl/spl_functions.c
@@ -100,20 +100,12 @@ 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_merge(&class_entry->function_table, &interface_entry->function_table, (copy_ctor_func_t) spl_inherit_method, NULL, sizeof(zend_function), 0);
+ class_entry->interfaces = realloc(class_entry->interfaces, sizeof(zend_class_entry*) * (class_entry->num_interfaces+1));
+ class_entry->interfaces[class_entry->num_interfaces++] = interface_entry;
+ zend_do_implement_interface(class_entry, interface_entry);
}
/* }}} */