Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] Optimization of getarrvalue()
- X-seq: zsh-workers 39883
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Sebastian Gniazdowski <psprint@xxxxxxxxxxxx>, zsh-workers@xxxxxxx
- Subject: Re: [PATCH] Optimization of getarrvalue()
- Date: Tue, 8 Nov 2016 23:11:13 -0800
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version; bh=LDYm3xG7KTDnbK6e3ttaPOCXHiLmEwJsQ4k6cAWQZdY=; b=F7geDNFE15WgLckx9TMgBW6kAUJj3Q9x3ZqsSzFceH+VKZuRv0Go5+blh0SOlh88Gh repZdTHNt7m5ZxSmYBZcfFxQQ6lwpXXErufwd5RHSK417n9KNOCdfi281LEArTBQshuW lvTklnzgKAd+WAFxYl6NqEjG+qhdwmI8HgnGMh8qQ7fwT5aZd9Kw0nOO/cZ91We+YT6a MD3idbchCNI/I5N5MVRqov0ROymjSaXXz3nFDJhuumwBzGBlxssF+CdJC0oSbONYEx8W vqSDuyxx6mO5DvxY+hWpKOhcA5f7oGEYL3GrIxgQxLGmELHDEM6DMOvd2Vst2eypAvAx JELw==
- In-reply-to: <1478635899.1897979.781551353.05792438@webmail.messagingengine.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <1478635899.1897979.781551353.05792438@webmail.messagingengine.com>
On Nov 8, 12:11pm, Sebastian Gniazdowski wrote:
}
} Interesting that some tests fail (e.g. ./Y03arguments.ztst) if I here
} duplicate nular instead of doing:
}
} } else if (v->end <= v->start) {
} s = arrdup_max(s, 1);
} s[0] = NULL;
}
} like in the original code.
Looking at this more closely, that's because nular isn't actually zero
length array, it's an array with a single empty string value. If you
leave out the s[0]=NULL assignment you're changing the results.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author