cvs: php-src /ext/simplexml simplexml.c
| From: | Marcus Boerger | Date: | Tue, 23 May 2006 22:22:35 +0000 |
| Subject: | cvs: php-src /ext/simplexml simplexml.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-38372@lists.php.net to get a copy of this message | ||
helly Tue May 23 22:22:35 2006 UTC
Modified files:
/php-src/ext/simplexml simplexml.c
Log:
- Readd NULL as allowed classname to skip parameter
http://cvs.php.net/viewcvs.cgi/php-src/ext/simplexml/simplexml.c?r1=1.208&r2=1.209&diff_format=u
Index: php-src/ext/simplexml/simplexml.c
diff -u php-src/ext/simplexml/simplexml.c:1.208 php-src/ext/simplexml/simplexml.c:1.209
--- php-src/ext/simplexml/simplexml.c:1.208 Tue May 23 21:37:17 2006
+++ php-src/ext/simplexml/simplexml.c Tue May 23 22:22:35 2006
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: simplexml.c,v 1.208 2006/05/23 21:37:17 helly Exp $ */
+/* $Id: simplexml.c,v 1.209 2006/05/23 22:22:35 helly Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -1836,7 +1836,7 @@
zend_class_entry *ce= sxe_class_entry;
zend_bool isprefix = 0;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|Clsb", &filename,
&filename_len, &ce, &options, &ns, &ns_len, &isprefix) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|C!lsb", &filename,
&filename_len, &ce, &options, &ns, &ns_len, &isprefix) == FAILURE) {
return;
}
@@ -1846,6 +1846,9 @@
RETURN_FALSE;
}
+ if (!ce) {
+ ce = sxe_class_entry;
+ }
sxe = php_sxe_object_new(ce TSRMLS_CC);
sxe->iter.nsprefix = ns_len ? xmlStrdup(ns) : NULL;
sxe->iter.isprefix = isprefix;
@@ -1871,7 +1874,7 @@
zend_class_entry *ce= sxe_class_entry;
zend_bool isprefix = 0;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|Clsb", &data, &data_len,
&ce, &options, &ns, &ns_len, &isprefix) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|C!lsb", &data,
&data_len, &ce, &options, &ns, &ns_len, &isprefix) == FAILURE) {
return;
}
@@ -1881,6 +1884,9 @@
RETURN_FALSE;
}
+ if (!ce) {
+ ce = sxe_class_entry;
+ }
sxe = php_sxe_object_new(ce TSRMLS_CC);
sxe->iter.nsprefix = ns_len ? xmlStrdup(ns) : NULL;
sxe->iter.isprefix = isprefix;
@@ -2130,7 +2136,7 @@
xmlNodePtr nodep = NULL;
zend_class_entry *ce= sxe_class_entry;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "o|C", &node, &ce) ==
FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "o|C!", &node, &ce) ==
FAILURE) {
return;
}
@@ -2149,6 +2155,9 @@
}
if (nodep && nodep->type == XML_ELEMENT_NODE) {
+ if (!ce) {
+ ce = sxe_class_entry;
+ }
sxe = php_sxe_object_new(ce TSRMLS_CC);
sxe->document = object->document;
php_libxml_increment_doc_ref((php_libxml_node_object *)sxe, nodep->doc TSRMLS_CC);
@@ -2253,7 +2262,7 @@
{
php_info_print_table_start();
php_info_print_table_header(2, "Simplexml support", "enabled");
- php_info_print_table_row(2, "Revision", "$Revision: 1.208 $");
+ php_info_print_table_row(2, "Revision", "$Revision: 1.209 $");
php_info_print_table_row(2, "Schema support",
#ifdef LIBXML_SCHEMAS_ENABLED
"enabled");