moriyoshi               Thu Jun  5 14:54:19 2003 EDT

  Modified files:              
    /php4/ext/xsl       xsltprocessor.c 
  Log:
  Avoid unnecesary zval separation 
  
  
Index: php4/ext/xsl/xsltprocessor.c
diff -u php4/ext/xsl/xsltprocessor.c:1.1 php4/ext/xsl/xsltprocessor.c:1.2
--- php4/ext/xsl/xsltprocessor.c:1.1    Thu Jun  5 13:10:13 2003
+++ php4/ext/xsl/xsltprocessor.c        Thu Jun  5 14:54:19 2003
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: xsltprocessor.c,v 1.1 2003/06/05 17:10:13 rrichards Exp $ */
+/* $Id: xsltprocessor.c,v 1.2 2003/06/05 18:54:19 moriyoshi Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -95,8 +95,10 @@
                        php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid argument 
or parameter array");
                        return NULL;
                } else {
-                       SEPARATE_ZVAL(value);
-                       convert_to_string_ex(value);
+                       if (Z_TYPE_PP(value) != IS_STRING) {
+                               SEPARATE_ZVAL(value);
+                               convert_to_string(*value);
+                       }
 
                        if (!xpath_params) {
                                xpath_expr = 
php_xsl_xslt_string_to_xpathexpr(Z_STRVAL_PP(value) TSRMLS_CC);



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

Reply via email to