Re: [libxml++] RE: [xml] xmlCreatePushParserCtxt() docs wrong (was RE: [libxml++ ] sax_pars er example: entity not defined)

On Wed, Nov 26, 2003 at 09:03:50AM +0100, Murray Cumming Comneon com wrote:
From: Daniel Veillard [mailto:veillard redhat com] 
On Tue, Nov 25, 2003 at 08:47:36PM +0100, 
Murray Cumming Comneon com wrote:
Daniel, as part of the story below, I noticed that the 
for xmlCreatePushParserCtxt() is wrong:

The user_data parameter is not returned to SAX callbacks 
(The context 
is, as void*). That parameter should probably always be 0.

  Hum, sounds like a bug, is that always the case or just in 
some callback circumstances ?

If you specify some user_data then you will get that user_data in the
callback instead of the context, but this will break the entity callbacks,
sometimes c ausing a crash. Setting it to 0 here, and not setting userData
ever directly in the context seems to make everything work.

  Well, maybe you want it to be NULL to "make everything work" in your
case, but from an libxml2 API it's a breakage, and need to be fixed.
Simply force it to NULL in your wrappers, the semantic should not change
even if the bug get fixed.


Daniel Veillard      | Red Hat Network
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]