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:

  Right that's baaad, and should be fixed !
Would you mind making a bugzilla entry so it doesn't get lost ?


(Sorry, I should have started there)

  if(((raptor_parser*)ctx)->magic == RAPTOR_LIBXML_MAGIC)
    /* ctx is not 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.


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