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

Re: [xml] Varying pointers in SAX2 error reporting callbacks



On Mon, 1 Sep 2003 16:50:22 -0400
Daniel Veillard <veillard redhat com> wrote:

> On Sun, Aug 31, 2003 at 05:08:06PM +0100, Dave Beckett wrote:
<snip/>
> 
>   Right that's baaad, and should be fixed !
> Would you mind making a bugzilla entry so it doesn't get lost ?

Done: http://bugzilla.gnome.org/show_bug.cgi?id=121210

(Sorry, I should have started there)

> >   if(((raptor_parser*)ctx)->magic == RAPTOR_LIBXML_MAGIC)
> >     rdf_parser=(raptor_parser*)ctx;
> >   else
> >     /* ctx is not userData */
> >     rdf_parser=(raptor_parser*)((xmlParserCtxtPtr)ctx)->userData;
> > 
> > which works.
> 
>   Yup, that's the only practical way to handle this right now, sorry
>   :-\
> The problem is around ->magic there is a minimal chance of failure,
> better avoid it for good.

I know, but I don't think of anything else apart from storing ctx in a
global variable in the main code, and that won't work if multiple
parsings (or threads) are going on at the same time.

Dave



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