Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] Optimization of getarrvalue()
On Mon, Nov 14, 2016, at 09:10 AM, Bart Schaefer wrote:
> The original code structure was
>
> if (A)
> a;
> else
> x;
> if (B)
> b;
> else if (C)
> c;
>
...
> This means that in the new structure, b never happens when A. In the
> old code we might allocate the array ('') and then truncate to (), but
> in the new code we allocate ('') and then do nothing.
I was aware of nular being something different because tests failed
(it's an easy thing to find though, but I chosen to signal problem
instead of solving it), however as the two if blocks are not connected
with else, nular can be, as you said, "again" truncated to 0 length.
That I didn't foresee.
--
Sebastian Gniazdowski
psprint@xxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author