From: "Rasmus Lerdorf" <[EMAIL PROTECTED]> > I am not sure how. We know if we are in the middle of parsing a PHP > script, but that doesn't necessarily mean that the libxml call is from a > PHP context. We could be calling some 3rd-party library that knows > nothing about PHP that happens to use libxml. But, when called from a PHP > context then we control the caller, so we could pass along a hint somehow, > couldn't we?
The callback is coming from libxml, which means a hint cant be passed to the callback (only the URI is sent). > > I also got a reponse from the libxml people and they indicate that trying to > > register and unregister the streams will not work reliably and basically > > they should be registered in the MINIT (where they currently are) to work > > correctly. > > Hrm. I wonder why that is? But that does mean this patch definitely > shouldn't go in. >From what is sounds, the patch shouldn't go in. The I/O registrations were designed as a global library feature and are meant to be called at initialization time. Much of it has to do with threading and re-entrancy. Latest followup: RR > I figured that was the case but wanted to make sure before going down the RR > rat hole, so trying to see if there is anything that can be done in our RR > matchcallback routines. Since the input is "just" the URI string, and that string may come from within the document it seems only an API addition is possible, this is not gonna be easy to design, Daniel -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php