cvs: spl / php_spl.c spl_functions.c /tests forward.phpt

From: Date: Mon, 26 May 2003 22:06:49 +0000
Subject: cvs: spl / php_spl.c spl_functions.c /tests forward.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-21275@lists.php.net to get a copy of this message
helly Mon May 26 18:06:49 2003 EDT Modified files: /spl php_spl.c spl_functions.c /spl/tests forward.phpt Log: - Fix handling of abstract methods. They must be inherited when inheriting a method. - Fix entry more (should be amed has_more). - Add a check against that bug. Index: spl/php_spl.c diff -u spl/php_spl.c:1.4 spl/php_spl.c:1.5 --- spl/php_spl.c:1.4 Sun May 25 15:10:44 2003 +++ spl/php_spl.c Mon May 26 18:06:49 2003 @@ -131,7 +131,7 @@ REGISTER_SPL_INTERFACE(spl, forward); REGISTER_SPL_INTF_FUNC(spl, forward, current); REGISTER_SPL_INTF_FUNC(spl, forward, next); - REGISTER_SPL_INTF_FUNC(spl, forward, more); + REGISTER_SPL_INTF_FUNC(spl, forward, has_more); REGISTER_SPL_INTERFACE(spl, sequence); REGISTER_SPL_INTF_FUNC(spl, sequence, rewind); Index: spl/spl_functions.c diff -u spl/spl_functions.c:1.3 spl/spl_functions.c:1.4 --- spl/spl_functions.c:1.3 Sat May 24 11:51:24 2003 +++ spl/spl_functions.c Mon May 26 18:06:49 2003 @@ -106,6 +106,7 @@ 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)); } /* }}} */ Index: spl/tests/forward.phpt diff -u spl/tests/forward.phpt:1.1.1.1 spl/tests/forward.phpt:1.2 --- spl/tests/forward.phpt:1.1.1.1 Thu May 1 19:28:28 2003 +++ spl/tests/forward.phpt Mon May 26 18:06:49 2003 @@ -36,6 +36,13 @@ $c_info = array(class_name($i) => array('inheits' => class_parents($i), 'implements' => class_implements($i))); print_r($c_info); +$methods = get_class_methods("spl::forward_assoc"); +sort($methods); +print_r($methods); +$methods = get_class_methods($i); +sort($methods); +print_r($methods); + echo "1st try\n"; foreach($i as $w) { @@ -75,6 +82,20 @@ ) +) +Array +( + [0] => current + [1] => has_more + [2] => key + [3] => next +) +Array +( + [0] => current + [1] => has_more + [2] => key + [3] => next ) 1st try c::has_more

« previous php.cvs (#21275) next »