Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: One possible answer to typeset vs. unset
- X-seq: zsh-workers 47707
- From: Felipe Contreras <felipe.contreras@xxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: One possible answer to typeset vs. unset
- Date: Tue, 1 Dec 2020 02:54:59 -0600
- Archived-at: <https://zsh.org/workers/47707>
- Archived-at: <http://www.zsh.org/sympa/arcsearch_id/zsh-workers/2020-12/CAMP44s2gZnM_JAi78gJwB%2BuX75Sdx0MQPkW7SZ6tUk85xEjvQg%40mail.gmail.com>
- Authentication-results: zsh.org; iprev=pass (mail-wm1-f44.google.com) smtp.remote-ip=209.85.128.44; dkim=pass header.d=gmail.com header.s=20161025 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none
- Cc: Zsh hackers list <zsh-workers@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=BG51USw7wkNho4xFyjUN3CzQuChtY/NkG5ssSJvec6Y=; b=N6RLfkDGCrPYsIKHVsAOA+9E8+HMnlBvXTdOZt4qEt/cAn+3Q+KeIN/m3wl80Hrjn7 1JsB4oRSPdfoPQns4HaK2EKfSE+xZFJiAkdCmZ6zDZjucw3OrNGUEVZrO/9MuiITMU2p x8x/IOzdGIO+zysicpQKgjZH3YIJP3pnNdGS9ZkzT/2j0ULVJ5S99tzWQBO/iDl++Vgp 1yCvH82EEwCQkc3RzuTAlkf5D09n8MYSWYx2pmfFMMe4T9YSLniFry3sld4+vD/WtT1K AO61310FI2Lc7J0Vk0zet3tw5Hclk9psojNSQqJYzdHPQY4QCdos/fiRkawGl0wgdsjb PRgA==
- In-reply-to: <CAH+w=7Zh8URUiLF2n1x-ZrvKO+=JC8wf+n692sRsFTRbkJrzXw@mail.gmail.com>
- List-archive: <http://www.zsh.org/sympa/arc/zsh-workers>
- List-help: <mailto:sympa@zsh.org?subject=help>
- List-id: <zsh-workers.zsh.org>
- List-owner: <mailto:zsh-workers-request@zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-subscribe: <mailto:sympa@zsh.org?subject=subscribe%20zsh-workers>
- List-unsubscribe: <mailto:sympa@zsh.org?subject=unsubscribe%20zsh-workers>
- References: <CAH+w=7Zh8URUiLF2n1x-ZrvKO+=JC8wf+n692sRsFTRbkJrzXw@mail.gmail.com>
- Sender: zsh-workers-request@xxxxxxx
On Sat, Nov 28, 2020 at 1:49 PM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> You can see these changes by checking out the "declarednull" branch.
I tried this branch, and I tried to make it pass all the tests. And it
did mostly work, except with tied variables.
I don't know what would be the proper solution for tied variables, but
I used this hack to make the tests pass:
--- a/Src/builtin.c
+++ b/Src/builtin.c
@@ -2513,6 +2513,7 @@ typeset_single(char *cname, char *pname, Param
pm, UNUSED(int func),
}
tdp->joinchar = joinchar;
tdp->arrptr = &altpm->u.arr;
+ altpm->node.flags &= ~PM_DECLAREDNULL;
pm->gsu.s = &tiedarr_gsu;
pm->u.data = tdp;
--
Felipe Contreras
Messages sorted by:
Reverse Date,
Date,
Thread,
Author