[PHP-CVS] cvs: spl / spl_functions.c
helly Thu Oct 23 03:09:05 2003 EDT Modified files: /splspl_functions.c Log: Update Index: spl/spl_functions.c diff -u spl/spl_functions.c:1.16 spl/spl_functions.c:1.17 --- spl/spl_functions.c:1.16Sat Sep 6 22:37:10 2003 +++ spl/spl_functions.c Thu Oct 23 03:09:04 2003 @@ -72,9 +72,7 @@ /* {{{ spl_register_implement */ void spl_register_implement(zend_class_entry * class_entry, zend_class_entry * interface_entry TSRMLS_DC) { - 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); + zend_class_implements(class_entry TSRMLS_CC, 1, interface_entry); } /* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: spl / spl_functions.c
helly Sat Sep 6 22:37:11 2003 EDT Modified files: /splspl_functions.c Log: ZTS fix Index: spl/spl_functions.c diff -u spl/spl_functions.c:1.15 spl/spl_functions.c:1.16 --- spl/spl_functions.c:1.15Sun Aug 3 18:29:20 2003 +++ spl/spl_functions.c Sat Sep 6 22:37:10 2003 @@ -93,7 +93,7 @@ prop_val-type = IS_NULL; } - zend_declare_property(class_entry, prop_name, strlen(prop_name), prop_val, prop_flags); + zend_declare_property(class_entry, prop_name, strlen(prop_name), prop_val, prop_flags TSRMLS_CC); } /* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: spl / spl_functions.c
helly Sat May 31 11:20:11 2003 EDT Modified files: /splspl_functions.c Log: Classes are neither interfaces nor necessarily abstract Index: spl/spl_functions.c diff -u spl/spl_functions.c:1.8 spl/spl_functions.c:1.9 --- spl/spl_functions.c:1.8 Thu May 29 19:55:07 2003 +++ spl/spl_functions.c Sat May 31 11:20:11 2003 @@ -70,7 +70,6 @@ *ppce = zend_register_internal_ns_class(ce, NULL, namespace_entry, NULL TSRMLS_CC); /* entries changed by initialize */ - (*ppce)-ce_flags = ZEND_ACC_ABSTRACT | ZEND_ACC_INTERFACE; (*ppce)-create_object = obj_ctor; } /* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: spl / spl_functions.c
At 14:46 29.05.2003, Andrei Zmievski wrote: On Tue, 27 May 2003, Marcus Boerger wrote: helly Mon May 26 20:14:04 2003 EDT Modified files: /spl spl_functions.c Log: 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. Marcus, How long before you copy the entire Zend engine into spl*.c? Hehe, no i need to fix the things in the engine and then get rid of the code in spl. marcus -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: spl / spl_functions.c
helly Thu May 29 19:34:23 2003 EDT Modified files: /splspl_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); } /* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: spl / spl_functions.c
helly Thu May 29 19:44:22 2003 EDT Modified files: /splspl_functions.c Log: Optimize Index: spl/spl_functions.c diff -u spl/spl_functions.c:1.6 spl/spl_functions.c:1.7 --- spl/spl_functions.c:1.6 Thu May 29 19:34:23 2003 +++ spl/spl_functions.c Thu May 29 19:44:22 2003 @@ -134,12 +134,13 @@ void spl_add_class_name(zval * list, zend_class_entry * pce TSRMLS_DC) { char * str = spl_make_fully_qualyfied_name(pce TSRMLS_CC); + size_t len = strlen(str); zval *tmp; - if (zend_hash_find(Z_ARRVAL_P(list), str, strlen(str)+1, (void*)tmp) == FAILURE) { + if (zend_hash_find(Z_ARRVAL_P(list), str, len+1, (void*)tmp) == FAILURE) { MAKE_STD_ZVAL(tmp); ZVAL_STRING(tmp, str, 0); - zend_hash_add(Z_ARRVAL_P(list), str, strlen(str)+1, tmp, sizeof(zval *), NULL); + zend_hash_add(Z_ARRVAL_P(list), str, len+1, tmp, sizeof(zval *), NULL); } else { efree(str); } @@ -153,23 +154,20 @@ for (num_interfaces = 0; num_interfaces pce-num_interfaces; num_interfaces++) { spl_add_class_name(list, pce-interfaces[num_interfaces] TSRMLS_CC); - spl_add_interfaces(list, pce-interfaces[num_interfaces] TSRMLS_CC); - } - if (pce-parent) { - spl_add_class_name(list, pce-parent TSRMLS_CC); - spl_add_interfaces(list, pce-parent TSRMLS_CC); } } /* }}} */ -/* {{{ spl_add_interfaces */ +/* {{{ spl_add_classes */ int spl_add_classes(zend_class_entry ** ppce, zval *list TSRMLS_DC) { - spl_add_class_name(list, *ppce TSRMLS_CC); - if ((*ppce)-parent) { - spl_add_classes((*ppce)-parent, list TSRMLS_CC); + zend_class_entry *pce = *ppce; + spl_add_class_name(list, pce TSRMLS_CC); + spl_add_interfaces(list, pce TSRMLS_CC); + while (pce-parent) { + pce = pce-parent; + spl_add_classes(pce-parent, list TSRMLS_CC); } - spl_add_interfaces(list, *ppce TSRMLS_CC); return 0; } /* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: spl / spl_functions.c
helly Thu May 29 19:55:07 2003 EDT Modified files: /splspl_functions.c Log: Fix last commit Index: spl/spl_functions.c diff -u spl/spl_functions.c:1.7 spl/spl_functions.c:1.8 --- spl/spl_functions.c:1.7 Thu May 29 19:44:22 2003 +++ spl/spl_functions.c Thu May 29 19:55:07 2003 @@ -166,7 +166,7 @@ spl_add_interfaces(list, pce TSRMLS_CC); while (pce-parent) { pce = pce-parent; - spl_add_classes(pce-parent, list TSRMLS_CC); + spl_add_classes(pce, list TSRMLS_CC); } return 0; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: spl / spl_functions.c
On Tue, 27 May 2003, Marcus Boerger wrote: helly Mon May 26 20:14:04 2003 EDT Modified files: /spl spl_functions.c Log: 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. Marcus, How long before you copy the entire Zend engine into spl*.c? -Andrei -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php