rrichards Wed Feb 11 07:19:27 2004 EDT Modified files: /php-src/ext/simplexml simplexml.c /php-src/ext/simplexml/tests 014.phpt 014a.phpt 014b.phpt 016.phpt bug27010.phpt Log: Fix compiler warnings Update tests http://cvs.php.net/diff.php/php-src/ext/simplexml/simplexml.c?r1=1.126&r2=1.127&ty=u Index: php-src/ext/simplexml/simplexml.c diff -u php-src/ext/simplexml/simplexml.c:1.126 php-src/ext/simplexml/simplexml.c:1.127 --- php-src/ext/simplexml/simplexml.c:1.126 Tue Feb 10 04:30:38 2004 +++ php-src/ext/simplexml/simplexml.c Wed Feb 11 07:19:25 2004 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: simplexml.c,v 1.126 2004/02/10 09:30:38 zeev Exp $ */ +/* $Id: simplexml.c,v 1.127 2004/02/11 12:19:25 rrichards Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -1077,15 +1077,6 @@ } /* }}} */ -/* {{{ _free_ns_entry() - */ -static void -_free_ns_entry(void *p, xmlChar *data) -{ - xmlFree(p); -} -/* }}} */ - /* {{{ sxe_object_free_storage() */ static void sxe_object_free_storage(void *object TSRMLS_DC) @@ -1150,7 +1141,7 @@ { zend_object_value rv; - rv.handle = zend_objects_store_put(intern, NULL, sxe_object_free_storage, sxe_object_clone TSRMLS_CC); + rv.handle = zend_objects_store_put(intern, NULL, (zend_objects_free_object_storage_t)sxe_object_free_storage, sxe_object_clone TSRMLS_CC); rv.handlers = (zend_object_handlers *) &sxe_object_handlers; return rv; @@ -1592,7 +1583,7 @@ { php_info_print_table_start(); php_info_print_table_header(2, "Simplexml support", "enabled"); - php_info_print_table_row(2, "Revision", "$Revision: 1.126 $"); + php_info_print_table_row(2, "Revision", "$Revision: 1.127 $"); php_info_print_table_row(2, "Schema support", #ifdef LIBXML_SCHEMAS_ENABLED "enabled"); http://cvs.php.net/diff.php/php-src/ext/simplexml/tests/014.phpt?r1=1.4&r2=1.5&ty=u Index: php-src/ext/simplexml/tests/014.phpt diff -u php-src/ext/simplexml/tests/014.phpt:1.4 php-src/ext/simplexml/tests/014.phpt:1.5 --- php-src/ext/simplexml/tests/014.phpt:1.4 Sat Jan 17 14:41:32 2004 +++ php-src/ext/simplexml/tests/014.phpt Wed Feb 11 07:19:26 2004 @@ -53,5 +53,7 @@ [0]=> string(2) "30" } - -Fatal error: Unsupported operand types in %s014.php on line %d +object(simplexml_element)#%d (1) { + [0]=> + string(2) "35" +} http://cvs.php.net/diff.php/php-src/ext/simplexml/tests/014a.phpt?r1=1.2&r2=1.3&ty=u Index: php-src/ext/simplexml/tests/014a.phpt diff -u php-src/ext/simplexml/tests/014a.phpt:1.2 php-src/ext/simplexml/tests/014a.phpt:1.3 --- php-src/ext/simplexml/tests/014a.phpt:1.2 Sat Jan 17 14:41:32 2004 +++ php-src/ext/simplexml/tests/014a.phpt Wed Feb 11 07:19:26 2004 @@ -48,9 +48,9 @@ NULL bool(false) ---Unsupported--- +NULL object(simplexml_element)#%d (1) { [0]=> - string(2) "30" + string(1) "5" } - -Fatal error: Unsupported operand types in %s014.php on line %d +===DONE=== \ No newline at end of file http://cvs.php.net/diff.php/php-src/ext/simplexml/tests/014b.phpt?r1=1.2&r2=1.3&ty=u Index: php-src/ext/simplexml/tests/014b.phpt diff -u php-src/ext/simplexml/tests/014b.phpt:1.2 php-src/ext/simplexml/tests/014b.phpt:1.3 --- php-src/ext/simplexml/tests/014b.phpt:1.2 Sat Jan 17 14:41:32 2004 +++ php-src/ext/simplexml/tests/014b.phpt Wed Feb 11 07:19:26 2004 @@ -50,7 +50,6 @@ ---Unsupported--- object(simplexml_element)#%d (1) { [0]=> - string(2) "30" + string(1) "5" } - -Fatal error: Unsupported operand types in %s014.php on line %d +===DONE=== \ No newline at end of file http://cvs.php.net/diff.php/php-src/ext/simplexml/tests/016.phpt?r1=1.5&r2=1.6&ty=u Index: php-src/ext/simplexml/tests/016.phpt diff -u php-src/ext/simplexml/tests/016.phpt:1.5 php-src/ext/simplexml/tests/016.phpt:1.6 --- php-src/ext/simplexml/tests/016.phpt:1.5 Thu Jan 22 16:47:54 2004 +++ php-src/ext/simplexml/tests/016.phpt Wed Feb 11 07:19:26 2004 @@ -54,4 +54,4 @@ [0]=> string(9) "JoeFooBar" } -===Done=== +===DONE=== http://cvs.php.net/diff.php/php-src/ext/simplexml/tests/bug27010.phpt?r1=1.1&r2=1.2&ty=u Index: php-src/ext/simplexml/tests/bug27010.phpt diff -u php-src/ext/simplexml/tests/bug27010.phpt:1.1 php-src/ext/simplexml/tests/bug27010.phpt:1.2 --- php-src/ext/simplexml/tests/bug27010.phpt:1.1 Thu Jan 22 16:55:09 2004 +++ php-src/ext/simplexml/tests/bug27010.phpt Wed Feb 11 07:19:26 2004 @@ -1,31 +1,32 @@ ---TEST-- -#27010: segfault and node text not displayed when returned from children() ---FILE-- -<?php - -$xml=<<<EOF -<drinks xmlns:hot="http://www.example.com/hot"> - <hot:drink><hot:name>Coffee</hot:name></hot:drink> - <hot:drink><hot:name>Tea</hot:name></hot:drink> - <drink><name>Cola</name></drink> - <drink><name>Juice</name></drink> -</drinks> -EOF; - -$sxe = simplexml_load_string($xml); - -foreach ($sxe as $element_name => $element) { - print "$element_name is $element->name\n"; -} - -foreach ($sxe->children('http://www.example.com/hot') as $element_name => $element) { - print "$element_name is $element->name\n"; -} -?> -===DONE=== ---EXPECT-- -drink is Cola -drink is Juice -drink is Coffee -drink is Tea -===DONE=== +--TEST-- +#27010: segfault and node text not displayed when returned from children() +--FILE-- +<?php + +$xml=<<<EOF +<drinks xmlns:hot="http://www.example.com/hot"> + <hot:drink><hot:name>Coffee</hot:name></hot:drink> + <hot:drink><hot:name>Tea</hot:name></hot:drink> + <drink><name>Cola</name></drink> + <drink><name>Juice</name></drink> +</drinks> +EOF; + +$sxe = simplexml_load_string($xml); + +foreach ($sxe as $element_name => $element) { + print "$element_name is $element->name\n"; +} + +foreach ($sxe->children('http://www.example.com/hot') as $element_name => $element) { + print "$element_name is $element->name\n"; +} + +?> +===DONE=== +--EXPECT-- +drink is Cola +drink is Juice +drink is Coffee +drink is Tea +===DONE===
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php