cvs: php4 /ext/domxml php_domxml.c

From: Date: Fri, 18 Jan 2002 15:03:14 +0000
Subject: cvs: php4 /ext/domxml php_domxml.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-9087@lists.php.net to get a copy of this message
chregu Fri Jan 18 10:03:14 2002 EDT Modified files: /php4/ext/domxml php_domxml.c Log: - added optional parameters format and level for domxml_dump_node() Index: php4/ext/domxml/php_domxml.c diff -u php4/ext/domxml/php_domxml.c:1.103 php4/ext/domxml/php_domxml.c:1.104 --- php4/ext/domxml/php_domxml.c:1.103 Fri Jan 18 07:40:12 2002 +++ php4/ext/domxml/php_domxml.c Fri Jan 18 10:03:13 2002 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_domxml.c,v 1.103 2002/01/18 12:40:12 chregu Exp $ */ +/* $Id: php_domxml.c,v 1.104 2002/01/18 15:03:13 chregu Exp $ */ /* TODO * - Support Notation Nodes @@ -2647,7 +2647,7 @@ } /* }}} */ -/* {{{ proto string domxml_dump_node([object doc_handle],object node_handle) +/* {{{ proto string domxml_dump_node([object doc_handle],object node_handle[,int format[,int level]]) Dumps node into string */ PHP_FUNCTION(domxml_dump_node) { @@ -2659,7 +2659,7 @@ int level = 0; int format = 0; - DOMXML_PARAM_ONE(docp, id, le_domxmldocp,"o",&nodep); + DOMXML_PARAM_THREE(docp, id, le_domxmldocp,"o|ll",&nodep,&format,&level); DOMXML_GET_OBJ(elementp, nodep, le_domxmlnodep); @@ -2676,10 +2676,11 @@ } xmlNodeDump(buf, docp, elementp,level,format); - + mem = xmlBufferContent(buf); if (!mem) { + xmlBufferFree(buf); RETURN_FALSE; } RETVAL_STRING(mem, 1);

« previous php.cvs (#9087) next »