Re: cvs: php4 /ext/xml xml.c

From: Date: Sun, 15 Jun 2003 09:48:27 +0000
Subject: Re: cvs: php4 /ext/xml xml.c
References: 1  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-21717@lists.php.net to get a copy of this message
I preferred to use xmlInitThreads() because xmlInitParser() does a set of operations related to the libxml's memory maganer and I tried hard to prevent it from being initialised before the start-up of the Zend MM. Do you have any good idea to deal with them in a consistent way? Moriyoshi "Rob Richards" <rrichards@php.net> wrote: > rrichards Sat Jun 14 14:14:06 2003 EDT > > Modified files: > /php4/ext/xml xml.c > Log: > use xmlInitParser instead of xmlInitThreads > reentrant safe as well > > Index: php4/ext/xml/xml.c > diff -u php4/ext/xml/xml.c:1.132 php4/ext/xml/xml.c:1.133 > --- php4/ext/xml/xml.c:1.132 Sat Jun 14 11:08:48 2003 > +++ php4/ext/xml/xml.c Sat Jun 14 14:14:05 2003 > @@ -18,7 +18,7 @@ > +----------------------------------------------------------------------+ > */ > > -/* $Id: xml.c,v 1.132 2003/06/14 15:08:48 rrichards Exp $ */ > +/* $Id: xml.c,v 1.133 2003/06/14 18:14:05 rrichards Exp $ */ > > #define IS_EXT_MODULE > > @@ -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_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_MSHUTDOWN_FUNCTION(xml) > { > #ifdef LIBXML_EXPAT_COMPAT > - if (xml_parser_inited) { > - xmlCleanupParser(); > - xml_parser_inited = 0; > - } > + xmlCleanupParser(); > #endif > return SUCCESS; > } > > > > -- > PHP CVS Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.cvs (#21717) next »