Re: [xml] Re: SAX and userData



On Mon, Apr 22, 2002 at 10:21:57AM -0400, David F. Newman wrote:
On Sun, 21 Apr 2002, David F. Newman wrote:
The page that documents xmlSAXParseFileWithData() describes:
"User data (void *) is stored within the parser context, so it is
available nearly everywhere in libxml."

Maybe it should be updated to include that the user data is
stored in the parser context's _private member and not in userData.

  right this makes sense, updated as:

 * User data (void *) is stored within the parser context in the
 * context's _private member, so it is available nearly everywhere in libxml

Also the documentation for the callbacks state:
ctx : the user data (XML parser context)

As a beginner to libxml this seemed contradictory.  Which was it?
The user data or the parser context?  Now I know that it could
be either.  Wouldn't it be better to always pass the parser context
and change the prototype to be xmlParserCtxtPtr ctx for the sake
of type safety?

  Hum, at that point, I prefer not changing it. Some of those parts are
"legacy" and I prefer not take any risk with those.

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]