rrichards               Fri Aug  4 18:10:02 2006 UTC

  Modified files:              
    /php-src/ext/xmlreader      php_xmlreader.c 
  Log:
  updated to use new modifier to specify converter
  
http://cvs.php.net/viewvc.cgi/php-src/ext/xmlreader/php_xmlreader.c?r1=1.38&r2=1.39&diff_format=u
Index: php-src/ext/xmlreader/php_xmlreader.c
diff -u php-src/ext/xmlreader/php_xmlreader.c:1.38 
php-src/ext/xmlreader/php_xmlreader.c:1.39
--- php-src/ext/xmlreader/php_xmlreader.c:1.38  Mon Jul 24 17:42:25 2006
+++ php-src/ext/xmlreader/php_xmlreader.c       Fri Aug  4 18:10:02 2006
@@ -16,7 +16,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: php_xmlreader.c,v 1.38 2006/07/24 17:42:25 rrichards Exp $ */
+/* $Id: php_xmlreader.c,v 1.39 2006/08/04 18:10:02 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -423,16 +423,10 @@
        xmlChar *retchar = NULL;
        xmlreader_object *intern;
        char *name;
-       UConverter *orig_runtime_conv;
 
-       orig_runtime_conv = UG(runtime_encoding_conv);
-       UG(runtime_encoding_conv) = UG(utf8_conv);
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &name, 
&name_len) == FAILURE) {
-               UG(runtime_encoding_conv) = orig_runtime_conv;
+       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s&", &name, 
&name_len, UG(utf8_conv)) == FAILURE) {
                return;
        }
-       UG(runtime_encoding_conv) = orig_runtime_conv;
 
        if (!name_len) {
                php_error_docref(NULL TSRMLS_CC, E_WARNING, "Argument cannot be 
an empty string");
@@ -630,16 +624,10 @@
        xmlreader_object *intern;
        xmlChar *retchar = NULL;
        char *name, *ns_uri;
-       UConverter *orig_runtime_conv;
-
-       orig_runtime_conv = UG(runtime_encoding_conv);
-       UG(runtime_encoding_conv) = UG(utf8_conv);
 
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", &name, 
&name_len, &ns_uri, &ns_uri_len) == FAILURE) {
-               UG(runtime_encoding_conv) = orig_runtime_conv;
+       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s&s&", &name, 
&name_len, UG(utf8_conv), &ns_uri, &ns_uri_len, UG(utf8_conv)) == FAILURE) {
                return;
        }
-       UG(runtime_encoding_conv) = orig_runtime_conv;
 
        if (name_len == 0 || ns_uri_len == 0) {
                php_error_docref(NULL TSRMLS_CC, E_WARNING, "Attribute Name and 
Namespace URI cannot be empty");
@@ -716,16 +704,10 @@
        int name_len = 0, retval;
        xmlreader_object *intern;
        char *name;
-       UConverter *orig_runtime_conv;
 
-       orig_runtime_conv = UG(runtime_encoding_conv);
-       UG(runtime_encoding_conv) = UG(utf8_conv);
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &name, 
&name_len) == FAILURE) {
-               UG(runtime_encoding_conv) = orig_runtime_conv;
+       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s&", &name, 
&name_len, UG(utf8_conv)) == FAILURE) {
                return;
        }
-       UG(runtime_encoding_conv) = orig_runtime_conv;
 
        if (name_len == 0) {
                php_error_docref(NULL TSRMLS_CC, E_WARNING, "Attribute Name is 
required");
@@ -783,18 +765,11 @@
        int name_len=0, ns_uri_len=0, retval;
        xmlreader_object *intern;
        char *name, *ns_uri;
-       UConverter *orig_runtime_conv;
-
-       orig_runtime_conv = UG(runtime_encoding_conv);
-       UG(runtime_encoding_conv) = UG(utf8_conv);
 
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", &name, 
&name_len, &ns_uri, &ns_uri_len) == FAILURE) {
-               UG(runtime_encoding_conv) = orig_runtime_conv;
+       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s&s&", &name, 
&name_len, UG(utf8_conv), &ns_uri, &ns_uri_len, UG(utf8_conv)) == FAILURE) {
                return;
        }
 
-       UG(runtime_encoding_conv) = orig_runtime_conv;
-
        if (name_len == 0 || ns_uri_len == 0) {
                php_error_docref(NULL TSRMLS_CC, E_WARNING, "Attribute Name and 
Namespace URI cannot be empty");
                RETURN_FALSE;
@@ -871,16 +846,10 @@
        int retval, name_len=0;
        xmlreader_object *intern;
        char *name = NULL;
-       UConverter *orig_runtime_conv;
-
-       orig_runtime_conv = UG(runtime_encoding_conv);
-       UG(runtime_encoding_conv) = UG(utf8_conv);
 
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s", &name, 
&name_len) == FAILURE) {
-               UG(runtime_encoding_conv) = orig_runtime_conv;
+       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s&", &name, 
&name_len, UG(utf8_conv)) == FAILURE) {
                return;
        }
-       UG(runtime_encoding_conv) = orig_runtime_conv;
 
        id = getThis();
        intern = (xmlreader_object *)zend_object_store_get_object(id TSRMLS_CC);
@@ -924,18 +893,11 @@
        char *encoding = NULL;
        char resolved_path[MAXPATHLEN + 1];
        xmlTextReaderPtr reader = NULL;
-       UConverter *orig_runtime_conv;
 
-       orig_runtime_conv = UG(runtime_encoding_conv);
-       UG(runtime_encoding_conv) = UG(utf8_conv);
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "t|s!l", &source, 
&source_len, &source_type, &encoding, &encoding_len, &options) == FAILURE) {
-               UG(runtime_encoding_conv) = orig_runtime_conv;
+       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "t|s!&l", &source, 
&source_len, &source_type, &encoding, &encoding_len, UG(utf8_conv), &options) 
== FAILURE) {
                return;
        }
 
-       UG(runtime_encoding_conv) = orig_runtime_conv;
-
        id = getThis();
        if (id != NULL) {
                if (! instanceof_function(Z_OBJCE_P(id), xmlreader_class_entry 
TSRMLS_CC)) {

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to