Re: [libxml++] RE: [xml] xmlCreatePushParserCtxt() docs wrong (was RE: [libxml++ ] sax_pars er example: entity not defined)
- From: Daniel Veillard <veillard redhat com>
- To: libxmlplusplus-general lists sourceforge net
- Cc: xml gnome org
- Subject: Re: [libxml++] RE: [xml] xmlCreatePushParserCtxt() docs wrong (was RE: [libxml++ ] sax_pars er example: entity not defined)
- Date: Wed, 26 Nov 2003 04:01:09 -0500
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
documentation
for xmlCreatePushParserCtxt() is wrong:
http://xmlsoft.org/html/libxml-parser.html#xmlCreatePushParserCtxt
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
--
Daniel Veillard | Red Hat Network https://rhn.redhat.com/
veillard redhat com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]