Re: cvs: php-src /ext/xsl php_xsl.c

From: Date: Sat, 29 Nov 2003 13:22:00 +0000
Subject: Re: cvs: php-src /ext/xsl php_xsl.c
References: 1  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-24739@lists.php.net to get a copy of this message
This is not C++, isn't it? :) The // comments are not allowed in C.. (Read the CODING_STANDARDS..again..) --Jani On Sat, 29 Nov 2003, Christian Stocker wrote: >chregu Sat Nov 29 08:07:21 2003 EDT > > Modified files: > /php-src/ext/xsl php_xsl.c > Log: > it's now possible to return a DomNode from userland functions back to the xsl-processor > > >Index: php-src/ext/xsl/php_xsl.c >diff -u php-src/ext/xsl/php_xsl.c:1.10 php-src/ext/xsl/php_xsl.c:1.11 >--- php-src/ext/xsl/php_xsl.c:1.10 Fri Nov 28 17:08:13 2003 >+++ php-src/ext/xsl/php_xsl.c Sat Nov 29 08:07:20 2003 >@@ -16,7 +16,7 @@ > +----------------------------------------------------------------------+ > */ > >-/* $Id: php_xsl.c,v 1.10 2003/11/28 22:08:13 chregu Exp $ */ >+/* $Id: php_xsl.c,v 1.11 2003/11/29 13:07:20 chregu Exp $ */ > > #ifdef HAVE_CONFIG_H > #include "config.h" >@@ -256,7 +256,14 @@ > php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to call handler %s()", > Z_STRVAL_P(&handler)); > } > } else { >- if (retval->type == IS_BOOL) { >+ if (retval->type == IS_OBJECT && instanceof_function( Z_OBJCE_P(retval), >dom_node_class_entry)) { >+ xmlNode *nodep; >+ dom_object *obj; >+ obj = (dom_object *)zend_object_store_get_object(retval TSRMLS_CC); >+ nodep = dom_object_get_node(obj); >+ valuePush(ctxt, xmlXPathNewNodeSet(nodep)); >+ } >+ else if (retval->type == IS_BOOL) { > valuePush(ctxt, xmlXPathNewBoolean(retval->value.lval)); > } else { > convert_to_string_ex(&retval); >@@ -362,6 +369,7 @@ > UNREGISTER_INI_ENTRIES(); > */ > xsltCleanupGlobals(); >+ //xmlMemoryDump(); > > return SUCCESS; > } > > -- https://www.paypal.com/xclick/business=sniper@php.net&no_note=1&tax=0&currency_code=EUR

« previous php.cvs (#24739) next »