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" <[EMAIL PROTECTED]> 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
> 


-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to