rrichards               Fri Dec  9 15:51:23 2005 EDT

  Modified files:              
    /php-src/ext/xmlwriter      php_xmlwriter.c 
    /php-src/ext/xmlwriter/tests        009.phpt OO_009.phpt 
  Log:
  allow NULL prefix to create default namespace
  fix tests
  
http://cvs.php.net/diff.php/php-src/ext/xmlwriter/php_xmlwriter.c?r1=1.24&r2=1.25&ty=u
Index: php-src/ext/xmlwriter/php_xmlwriter.c
diff -u php-src/ext/xmlwriter/php_xmlwriter.c:1.24 
php-src/ext/xmlwriter/php_xmlwriter.c:1.25
--- php-src/ext/xmlwriter/php_xmlwriter.c:1.24  Thu Dec  8 23:56:20 2005
+++ php-src/ext/xmlwriter/php_xmlwriter.c       Fri Dec  9 15:51:19 2005
@@ -17,7 +17,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: php_xmlwriter.c,v 1.24 2005/12/09 04:56:20 rrichards Exp $ */
+/* $Id: php_xmlwriter.c,v 1.25 2005/12/09 20:51:19 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&r2=1.2&ty=u
Index: php-src/ext/xmlwriter/tests/009.phpt
diff -u php-src/ext/xmlwriter/tests/009.phpt:1.1 
php-src/ext/xmlwriter/tests/009.phpt:1.2
--- php-src/ext/xmlwriter/tests/009.phpt:1.1    Thu Dec  8 23:56:21 2005
+++ php-src/ext/xmlwriter/tests/009.phpt        Fri Dec  9 15:51:23 2005
@@ -7,7 +7,7 @@
 ?>
 --FILE--
 <?php 
-/* $Id: 009.phpt,v 1.1 2005/12/09 04:56:21 rrichards Exp $ */
+/* $Id: 009.phpt,v 1.2 2005/12/09 20:51:23 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&r2=1.2&ty=u
Index: php-src/ext/xmlwriter/tests/OO_009.phpt
diff -u php-src/ext/xmlwriter/tests/OO_009.phpt:1.1 
php-src/ext/xmlwriter/tests/OO_009.phpt:1.2
--- php-src/ext/xmlwriter/tests/OO_009.phpt:1.1 Thu Dec  8 23:56:21 2005
+++ php-src/ext/xmlwriter/tests/OO_009.phpt     Fri Dec  9 15:51:23 2005
@@ -7,7 +7,7 @@
 ?>
 --FILE--
 <?php 
-/* $Id: OO_009.phpt,v 1.1 2005/12/09 04:56:21 rrichards Exp $ */
+/* $Id: OO_009.phpt,v 1.2 2005/12/09 20:51:23 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

Reply via email to