From: Rob Richards Date: Sat, 14 Jun 2003 18:14:05 +0000 (+0000) Subject: use xmlInitParser instead of xmlInitThreads X-Git-Tag: RELEASE_1_0_2~256 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c104c0d6767b0d798f1fd3ea2bcefb3143bd8394;p=php use xmlInitParser instead of xmlInitThreads reentrant safe as well --- diff --git a/ext/xml/xml.c b/ext/xml/xml.c index af0d25dc2d..8353cfd8c1 100644 --- a/ext/xml/xml.c +++ b/ext/xml/xml.c @@ -38,8 +38,6 @@ #include "php_xml.h" # include "ext/standard/head.h" -PHP_XML_API int xml_parser_inited = 0; - /* Short-term TODO list: * - Implement XML_ExternalEntityParserCreate() * - XML_SetCommentHandler @@ -231,10 +229,7 @@ PHP_MINIT_FUNCTION(xml) php_xml_mem_hdlrs.free_fcn = php_xml_free_wrapper; #ifdef LIBXML_EXPAT_COMPAT - if (!xml_parser_inited) { - xmlInitThreads(); - xml_parser_inited = 1; - } + xmlInitParser(); #endif return SUCCESS; } @@ -249,10 +244,7 @@ PHP_RINIT_FUNCTION(xml) PHP_MSHUTDOWN_FUNCTION(xml) { #ifdef LIBXML_EXPAT_COMPAT - if (xml_parser_inited) { - xmlCleanupParser(); - xml_parser_inited = 0; - } + xmlCleanupParser(); #endif return SUCCESS; }