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



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.

Murray Cumming
www.murrayc.com
murrayc usa net



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