From: Christian Stocker Date: Mon, 17 Jan 2005 16:01:35 +0000 (+0000) Subject: MFH X-Git-Tag: php-5.0.4RC1~334 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4984c16261a4a856a1761ff294f579944947805a;p=php MFH proto fixes --- diff --git a/ext/xsl/php_xsl.c b/ext/xsl/php_xsl.c index 904739a265..4303e0140f 100644 --- a/ext/xsl/php_xsl.c +++ b/ext/xsl/php_xsl.c @@ -83,6 +83,11 @@ void xsl_objects_free_storage(void *object TSRMLS_DC) FREE_HASHTABLE(intern->node_list); } + if (intern->doc) { + php_libxml_decrement_doc_ref(intern->doc TSRMLS_CC); + efree(intern->doc); + } + if (intern->ptr) { /* free wrapper */ if (((xsltStylesheetPtr) intern->ptr)->_private != NULL) { @@ -112,6 +117,7 @@ zend_object_value xsl_objects_new(zend_class_entry *class_type TSRMLS_DC) intern->hasKeys = 0; intern->registerPhpFunctions = 0; intern->node_list = NULL; + intern->doc = NULL; ALLOC_HASHTABLE(intern->std.properties); zend_hash_init(intern->std.properties, 0, NULL, ZVAL_PTR_DTOR, 0); diff --git a/ext/xsl/php_xsl.h b/ext/xsl/php_xsl.h index fb607659d7..9995e496ac 100644 --- a/ext/xsl/php_xsl.h +++ b/ext/xsl/php_xsl.h @@ -58,6 +58,7 @@ typedef struct _xsl_object { int hasKeys; int registerPhpFunctions; HashTable *node_list; + php_libxml_node_object *doc; } xsl_object; void php_xsl_set_object(zval *wrapper, void *obj TSRMLS_DC); diff --git a/ext/xsl/xsltprocessor.c b/ext/xsl/xsltprocessor.c index a7d0efdf2f..fafeb0beb5 100644 --- a/ext/xsl/xsltprocessor.c +++ b/ext/xsl/xsltprocessor.c @@ -324,7 +324,7 @@ void xsl_ext_function_object_php(xmlXPathParserContextPtr ctxt, int nargs) } -/* {{{ proto xsl_xsltdocucument xsl_xsltprocessor_import_stylesheet(node index); +/* {{{ proto void xsl_xsltprocessor_import_stylesheet(domdocument doc); URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html# Since: */ @@ -457,7 +457,7 @@ static xmlDocPtr php_xsl_apply_stylesheet(xsl_object *intern, xsltStylesheetPtr } -/* {{{ proto xsl_document xsl_xsltprocessor_transform_to_doc(node doc [,boolean clone]); +/* {{{ proto domdocument xsl_xsltprocessor_transform_to_doc(domnode doc); URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html# Since: */ @@ -501,7 +501,7 @@ PHP_FUNCTION(xsl_xsltprocessor_transform_to_doc) /* }}} end xsl_xsltprocessor_transform_to_doc */ -/* {{{ proto xsl_ xsl_xsltprocessor_transform_to_uri(node doc, string uri [,boolean clone]); +/* {{{ proto int xsl_xsltprocessor_transform_to_uri(domdocument doc, string uri); */ PHP_FUNCTION(xsl_xsltprocessor_transform_to_uri) { @@ -545,7 +545,7 @@ PHP_FUNCTION(xsl_xsltprocessor_transform_to_uri) /* }}} end xsl_xsltprocessor_transform_to_uri */ -/* {{{ proto xsl_string xsl_xsltprocessor_transform_to_xml(node doc [,boolean clone]); +/* {{{ proto string xsl_xsltprocessor_transform_to_xml(domdocument doc); */ PHP_FUNCTION(xsl_xsltprocessor_transform_to_xml) { @@ -621,7 +621,7 @@ PHP_FUNCTION(xsl_xsltprocessor_set_parameter) } /* }}} end xsl_xsltprocessor_set_parameter */ -/* {{{ proto xsl_ xsl_xsltprocessor_get_parameter(string namespace, string name); +/* {{{ proto string xsl_xsltprocessor_get_parameter(string namespace, string name); */ PHP_FUNCTION(xsl_xsltprocessor_get_parameter) { @@ -646,7 +646,7 @@ PHP_FUNCTION(xsl_xsltprocessor_get_parameter) } /* }}} end xsl_xsltprocessor_get_parameter */ -/* {{{ proto xsl_ xsl_xsltprocessor_remove_parameter(string namespace, string name); +/* {{{ proto bool xsl_xsltprocessor_remove_parameter(string namespace, string name); */ PHP_FUNCTION(xsl_xsltprocessor_remove_parameter) { @@ -669,7 +669,7 @@ PHP_FUNCTION(xsl_xsltprocessor_remove_parameter) } /* }}} end xsl_xsltprocessor_remove_parameter */ -/* {{{ proto xsl_xsltprocessor_register_php_functions(); +/* {{{ proto void xsl_xsltprocessor_register_php_functions(); */ PHP_FUNCTION(xsl_xsltprocessor_register_php_functions) { @@ -685,7 +685,7 @@ PHP_FUNCTION(xsl_xsltprocessor_register_php_functions) } /* }}} end xsl_xsltprocessor_register_php_functions(); */ -/* {{{ proto xsl_xsltprocessor_has_exslt_support(); +/* {{{ proto bool xsl_xsltprocessor_has_exslt_support(); */ PHP_FUNCTION(xsl_xsltprocessor_has_exslt_support) {