rrichards Sat Jun 14 11:08:49 2003 EDT Modified files: /php4/ext/xml xml.c Log: fix common libxml init and deinit routines Index: php4/ext/xml/xml.c diff -u php4/ext/xml/xml.c:1.131 php4/ext/xml/xml.c:1.132 --- php4/ext/xml/xml.c:1.131 Sat Jun 14 07:22:13 2003 +++ php4/ext/xml/xml.c Sat Jun 14 11:08:48 2003 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: xml.c,v 1.131 2003/06/14 11:22:13 rrichards Exp $ */ +/* $Id: xml.c,v 1.132 2003/06/14 15:08:48 rrichards Exp $ */ #define IS_EXT_MODULE @@ -231,7 +231,10 @@ php_xml_mem_hdlrs.free_fcn = php_xml_free_wrapper; #ifdef LIBXML_EXPAT_COMPAT - xmlInitThreads(); + if (!xml_parser_inited) { + xmlInitThreads(); + xml_parser_inited = 1; + } #endif return SUCCESS; } @@ -245,18 +248,18 @@ PHP_MSHUTDOWN_FUNCTION(xml) { +#ifdef LIBXML_EXPAT_COMPAT + if (xml_parser_inited) { + xmlCleanupParser(); + xml_parser_inited = 0; + } +#endif return SUCCESS; } PHP_RSHUTDOWN_FUNCTION(xml) { -#ifdef LIBXML_EXPAT_COMPAT - if (xml_parser_inited) { - xmlCleanupParser(); - xml_parser_inited = 0; - } -#endif return SUCCESS; }
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php