From 052f9378b2cc5a3fffc3c7caad7a1df8a48ecd15 Mon Sep 17 00:00:00 2001 From: Shane Caraveo Date: Sun, 19 Oct 2003 23:17:56 +0000 Subject: add global init/shutdown functions for libxml. this is required as shutdown is not safe to call multiple times, and to make streams work correctly some init stuff has to happen in a specific order --- ext/xml/xml.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'ext/xml/xml.c') diff --git a/ext/xml/xml.c b/ext/xml/xml.c index 10b49119c3..4d644cacc0 100644 --- a/ext/xml/xml.c +++ b/ext/xml/xml.c @@ -37,6 +37,9 @@ #include "php_xml.h" # include "ext/standard/head.h" +#ifdef LIBXML_EXPAT_COMPAT +#include "ext/libxml/php_libxml.h" +#endif /* Short-term TODO list: * - Implement XML_ExternalEntityParserCreate() @@ -238,7 +241,7 @@ PHP_MINIT_FUNCTION(xml) php_xml_mem_hdlrs.free_fcn = php_xml_free_wrapper; #ifdef LIBXML_EXPAT_COMPAT - xmlInitParser(); + php_libxml_initialize(); #endif return SUCCESS; } @@ -253,7 +256,7 @@ PHP_RINIT_FUNCTION(xml) PHP_MSHUTDOWN_FUNCTION(xml) { #ifdef LIBXML_EXPAT_COMPAT - xmlCleanupParser(); + php_libxml_shutdown(); #endif return SUCCESS; } -- cgit v1.2.1