cvs: spl / spl_functions.c
| From: | Marcus Boerger | Date: | Thu, 29 May 2003 23:34:23 +0000 |
| Subject: | cvs: spl / spl_functions.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-21338@lists.php.net to get a copy of this message | ||
helly Thu May 29 19:34:23 2003 EDT
Modified files:
/spl spl_functions.c
Log:
Make use of ze2 code
Index: spl/spl_functions.c
diff -u spl/spl_functions.c:1.5 spl/spl_functions.c:1.6
--- spl/spl_functions.c:1.5 Mon May 26 20:14:04 2003
+++ spl/spl_functions.c Thu May 29 19:34:23 2003
@@ -100,20 +100,12 @@
}
/* }}} */
-/* {{{ 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);
}
/* }}} */