Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] [long] typeset doesn't report tied parameters (and related issues)
- X-seq: zsh-workers 43656
- From: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
- To: <zsh-workers@xxxxxxx>
- Subject: Re: [PATCH] [long] typeset doesn't report tied parameters (and related issues)
- Date: Tue, 9 Oct 2018 10:44:15 +0100
- Cms-type: 201P
- Dkim-filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20181009094417euoutp02e0d5882ab5461dcb1b265b8cb342e512~b54ViEMOU1043810438euoutp02G
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1539078257; bh=993dEZoQT1DME0WxElHRm89pHXn5tvOrL4NrHsj61Po=; h=Subject:From:To:Date:In-Reply-To:References:From; b=qIrahD3W5RVnWfGtC51sC44OJHRL8tWyZxHsH71e+oJPE7p451JoZzW3v+z6DV06s L6vMUu+FZiVBW9AOwu07Qzh2asswgekLt6Cmu5pPtF0UYQV/u4wFWjDmUhFmoxcw0f +Kx5Epff7rNLbZ7ttqZQiUk9cswXGE7yBRS8dAFA=
- In-reply-to: <1539075745.1499.2.camel@samsung.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>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20180924210550.carijwjibarjivu4@chaz.gmail.com> <CGME20181007133632epcas5p43a3b4c7f0fe1863478748c5cf46ce8ef@epcas5p4.samsung.com> <20181007133545.zzkrbc3ed6shnk3e@chaz.gmail.com> <20181008090557eucas1p11f18ef9ca4a6e3cc09fd59242f344f96~bltk3bsqO1947719477eucas1p1q@eucas1p1.samsung.com> <CACeGjnUhNqca7jLAR0KKSxobzDd+xXdAe4BeUeRpxu2CTp_zkA@mail.gmail.com> <20181008141056eucas1p2a9a49ec055d2760e87c17832af9f6591~bp33g9vlR0328803288eucas1p2G@eucas1p2.samsung.com> <1539008917.1366329.1534632080.5313528C@webmail.messagingengine.com> <20181008152406eucas1p1660f190ddb4bcd4c0131c4c84492a9f2~bq3vkNlyg2997729977eucas1p1I@eucas1p1.samsung.com> <20181008154932.dvc5q46ylb66j2mm@tarpaulin.shahaf.local2> <20181008164357eucas1p28f2fd7942bffedcc4e769b2ad5d35c51~br9daEJcB1834618346eucas1p2w@eucas1p2.samsung.com> <1539017933.1412806.1534816128.38CEBA8F@webmail.messagingengine.com> <1539075745.1499.2.camel@samsung.com>
On Tue, 2018-10-09 at 10:02 +0100, Peter Stephenson wrote:
> On Mon, 2018-10-08 at 16:58 +0000, Daniel Shahaf wrote:
> > Peter Stephenson wrote on Mon, 08 Oct 2018 17:43 +0100:
> > So the lex.c error may be an independent issue. The link to the typeset
> > change is probably the failure address, 0x3A, which is the hex value of
> > the ASCII colon character, which is the joinchar of $MANPATH.
> That's interesting and points to a problem along the lines I suggested
> --- confusion between special and non-special tied variables. MANPATH
> as a special tied variable uses colonarrsetfn() / colonarrgetfn() to set
> and retrieve values, which uses a colon implicitly, not from the
> parameter structure. Non-special tied arrays have a tieddata structure
> in the data.
I wonder if this has anything to do with it? I haven't definitely
verified we can get here in the case newly tested but it's not obvious
we can't.
pws
diff --git a/Src/builtin.c b/Src/builtin.c
index b81acdb..ca3ef23 100644
--- a/Src/builtin.c
+++ b/Src/builtin.c
@@ -2258,7 +2258,7 @@ typeset_single(char *cname, char *pname, Param pm,
UNUSED(int func),
} else if (pm->env && !(pm->node.flags & PM_HASHELEM))
delenv(pm);
DPUTS(ASG_ARRAYP(asg), "BUG: typeset got array value where scalar
expected");
- if (altpm) {
+ if (altpm && !(pm->node.flags & PM_SPECIAL)) {
struct tieddata* tdp = (struct tieddata *) pm->u.data;
if (tdp) {
if (tdp->joinchar != joinchar && !asg->value.scalar) {
Messages sorted by:
Reverse Date,
Date,
Thread,
Author