Hi,

"Rob Richards" <[EMAIL PROTECTED]> wrote:

> xmlInitThreads currently doesnt do anything right now. It is just a function
> for future use. In a non threaded environment, it really doesnt matter. You
> can get away without even calling any init routines as they would be called
> upon the first invocation of the parser, but once you get into a threaded
> environment, libxml needs to initialize itself on the main thread.

Well, virtually xmlInitThreads() doesn't do anything as of the current 
libxml, but I'd not found such a description in the documentation that 
states xmlInitThreads() is reserved for future use..?

> Unless there is a way to inject it after the start-up of the Zend MM, this
> is the only spot I know of to get the initialization in there. Other than
> for consistancy is there any problem in having it initialize before the Zend
> MM?

In compat.c, xmlMemSetup() is called with XML_ParserCreate_MM() to 
initialise the libxml MM so it would take advantage of Zend allocators 
(emalloc family) instead of the plain libc allocators. I know that's a 
kind of bogus stuff, but then how should we handle it?

1. statically initialise them in PHP_MINIT_FUNCTION() in advance of any 
call of XML_ParserCreateMM() at runtime and ignore the second parameter 
passed to XML_ParserCreateMM().

2. use the libc allocators in any way.

Moriyoshi


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

Reply via email to