From: Daniel Veillard (Daniel.Veillard@w3.org)
Date: Fri Nov 24 2000 - 18:53:02 EST
On Sun, Nov 19, 2000 at 07:40:21PM -0000, Leo Davidson wrote:
> Just a quick comment on xmlSetGenericErrorFunc: Since it ignores any NULL
> arguments (ctx or handler), there's (a) no way to specify a NULL ctx if
> that's what you really want and (b) no way to revert back to the default
> handling.
[snip]
> Why not change xmlSetGenericErrorFunc to:
>
> void
> xmlSetGenericErrorFunc(void *ctx, xmlGenericErrorFunc handler)
> {
> // Always set ctx as requested.
> xmlGenericErrorContext = ctx;
>
> // Set handler as requested, or restore default if NULL.
> if (handler != NULL)
> xmlGenericError = handler;
> else
> xmlGenericError = xmlGenericErrorDefaultFunc;
> }
>
> Of course, this assumes that if handler is NULL then either ctx is also NULL
> or the caller has set ctx to a FILE*. If that assumption doesn't hold then
> the default handler will crash.
adopted, I made the change,
Daniel
-- Daniel.Veillard@w3.org | W3C MIT/LCS NE43-344 | Today's Bookmarks : Tel : +1 617 253 5884 | 545 Technology Square | Linux, WWW, Java, Fax : +1 617 258 5999 | Cambridge, MA 02139 USA | badminton, Kaffe, http://www.w3.org/People/W3Cpeople.html#Veillard | HTTP-NG and Amaya. ---- Message from the list xml@rpmfind.net Archived at : http://xmlsoft.org/messages/ to unsubscribe: echo "unsubscribe xml" | mail majordomo@rpmfind.net
This archive was generated by hypermail 2b29 : Fri Nov 24 2000 - 19:44:02 EST