rrichards Fri Dec 9 15:52:15 2005 EDT Modified files: (Branch: PHP_5_1) /php-src/ext/xmlwriter php_xmlwriter.c /php-src/ext/xmlwriter/tests 009.phpt OO_009.phpt Log: MFH: allow NULL prefix to create default namespace fix tests http://cvs.php.net/diff.php/php-src/ext/xmlwriter/php_xmlwriter.c?r1=1.20.2.5&r2=1.20.2.6&ty=u Index: php-src/ext/xmlwriter/php_xmlwriter.c diff -u php-src/ext/xmlwriter/php_xmlwriter.c:1.20.2.5 php-src/ext/xmlwriter/php_xmlwriter.c:1.20.2.6 --- php-src/ext/xmlwriter/php_xmlwriter.c:1.20.2.5 Thu Dec 8 23:57:20 2005 +++ php-src/ext/xmlwriter/php_xmlwriter.c Fri Dec 9 15:52:15 2005 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_xmlwriter.c,v 1.20.2.5 2005/12/09 04:57:20 rrichards Exp $ */ +/* $Id: php_xmlwriter.c,v 1.20.2.6 2005/12/09 20:52:15 rrichards Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -658,7 +658,7 @@ if (this) { if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ssss", - &name, &name_len, &content, &content_len) == FAILURE) { + &prefix, &prefix_len, &name, &name_len, &uri, &uri_len, &content, &content_len) == FAILURE) { return; } XMLWRITER_FROM_OBJECT(intern, this); @@ -743,7 +743,7 @@ zval *this = getThis(); if (this) { - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sss", + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s!ss", &prefix, &prefix_len, &name, &name_len, &uri, &uri_len) == FAILURE) { return; } @@ -751,7 +751,7 @@ } else #endif { - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rsss", &pind, + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs!ss", &pind, &prefix, &prefix_len, &name, &name_len, &uri, &uri_len) == FAILURE) { return; } @@ -839,7 +839,7 @@ zval *this = getThis(); if (this) { - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ssss", + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s!sss", &prefix, &prefix_len, &name, &name_len, &uri, &uri_len, &content, &content_len) == FAILURE) { return; } @@ -847,7 +847,7 @@ } else #endif { - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rssss", &pind, + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs!sss", &pind, &prefix, &prefix_len, &name, &name_len, &uri, &uri_len, &content, &content_len) == FAILURE) { return; } http://cvs.php.net/diff.php/php-src/ext/xmlwriter/tests/009.phpt?r1=1.1.2.2&r2=1.1.2.3&ty=u Index: php-src/ext/xmlwriter/tests/009.phpt diff -u php-src/ext/xmlwriter/tests/009.phpt:1.1.2.2 php-src/ext/xmlwriter/tests/009.phpt:1.1.2.3 --- php-src/ext/xmlwriter/tests/009.phpt:1.1.2.2 Thu Dec 8 23:57:20 2005 +++ php-src/ext/xmlwriter/tests/009.phpt Fri Dec 9 15:52:15 2005 @@ -7,7 +7,7 @@ ?> --FILE-- <?php -/* $Id: 009.phpt,v 1.1.2.2 2005/12/09 04:57:20 rrichards Exp $ */ +/* $Id: 009.phpt,v 1.1.2.3 2005/12/09 20:52:15 rrichards Exp $ */ $xw = xmlwriter_open_memory(); xmlwriter_set_indent($xw, TRUE); @@ -22,11 +22,11 @@ xmlwriter_end_element($xw); xmlwriter_start_element($xw, 'cdata'); xmlwriter_start_cdata($xw); -xmlwriter_end_element($xw); xmlwriter_text($xw, '<>&"'); xmlwriter_end_cdata($xw); xmlwriter_end_element($xw); xmlwriter_end_element($xw); +xmlwriter_end_element($xw); xmlwriter_end_document($xw); // Force to write and empty the buffer $output = xmlwriter_flush($xw, true); http://cvs.php.net/diff.php/php-src/ext/xmlwriter/tests/OO_009.phpt?r1=1.1.2.2&r2=1.1.2.3&ty=u Index: php-src/ext/xmlwriter/tests/OO_009.phpt diff -u php-src/ext/xmlwriter/tests/OO_009.phpt:1.1.2.2 php-src/ext/xmlwriter/tests/OO_009.phpt:1.1.2.3 --- php-src/ext/xmlwriter/tests/OO_009.phpt:1.1.2.2 Thu Dec 8 23:57:20 2005 +++ php-src/ext/xmlwriter/tests/OO_009.phpt Fri Dec 9 15:52:15 2005 @@ -7,7 +7,7 @@ ?> --FILE-- <?php -/* $Id: OO_009.phpt,v 1.1.2.2 2005/12/09 04:57:20 rrichards Exp $ */ +/* $Id: OO_009.phpt,v 1.1.2.3 2005/12/09 20:52:15 rrichards Exp $ */ $xw = new XMLWriter(); $xw->openMemory(); @@ -23,11 +23,11 @@ $xw->endElement(); $xw->startElement('cdata'); $xw->startCdata(); -$xw->endElement(); $xw->text('<>&"'); $xw->endCdata(); $xw->endElement(); $xw->endElement(); +$xw->endElement(); $xw->endDocument(); // Force to write and empty the buffer $output = $xw->flush(true);
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php