[Expat-bugs] [ expat-Bugs-1786964 ] 2.0.1: Documentation of the Userdata void * is wrong.

SourceForge.net noreply at sourceforge.net
Mon Sep 3 11:09:20 CEST 2007


Bugs item #1786964, was opened at 2007-09-03 02:09
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=110127&aid=1786964&group_id=10127

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Documentation
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Fred L. Drake, Jr. (fdrake)
Summary: 2.0.1: Documentation of the Userdata void * is wrong.

Initial Comment:
In the documentation it says that the userdata void* in the handler functions are set with XML_SetUserData.

This is not correct...

The userdata is set correctly, but the void * in the handler functions are in fact the XML_Parser, which can then be used to get the userdata (using XML_GetUserData).

I strongly suggest that the documentation is corrected to fit this behaviour, and that the declaration of the handler functions are changed from

typedef void
(XMLCALL *XML_StartElementHandler)(void *userData,
                                   const XML_Char *name,
                                   const XML_Char **atts);

to

typedef void
(XMLCALL *XML_StartElementHandler)(XML_Parser parser,
                                   const XML_Char *name,
                                   const XML_Char **atts);

and likewise for the rest of the handler functions...

// Bent Bisballe Nyeng (deva HOS aasimon PRIK org)

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=110127&aid=1786964&group_id=10127


More information about the Expat-bugs mailing list