[Top][All Lists]

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

Re: locale-dependent assertion failure in gawk 3.1.5

From: Jürgen Kahrs
Subject: Re: locale-dependent assertion failure in gawk 3.1.5
Date: Sun, 09 Jul 2006 14:26:04 +0200
User-agent: Thunderbird 1.5 (X11/20060317)

Andrew J. Schorr wrote:

> So does the attached patch make sense?  Or would it be better to
> use a macro to avoid the performance hit of a function call?

I like the patch as it is. In these days, the
performance hit by a function call shouldnt be
so large. The patch as it is is well documented,
that's more important to me.

> I think it's a bit cleaner/safer not to repeat the same code
> in multiple places...


> Given that NODE is a union, I'm not clear on whether it's OK to
> test the wstptr value if the WSTRCUR flag is not set.  I guess
> one has to assume that wstptr may contain random garbage if WSTRCUR
> is not set; is that the correct approach?  Or would it be safe to


> assume that if STRCUR is set, then
>    (wstptr != NULL) <==> ((flags & WSTRCUR) != 0)?

I'm not sure. But situations like these are exactly
what assertions are made for. And you have an assertion
in the new function. So, it looks OK to me.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]