Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] declarednull: felipec's approach
- X-seq: zsh-workers 47775
- From: Felipe Contreras <felipe.contreras@xxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: [PATCH] declarednull: felipec's approach
- Date: Mon, 28 Dec 2020 15:58:48 -0600
- Archived-at: <https://zsh.org/workers/47775>
- Archived-at: <http://www.zsh.org/sympa/arcsearch_id/zsh-workers/2020-12/CAMP44s3302D3CzVA6VPoJBO3kT0-QJLhJr2eYt7omUVXyW_EbA%40mail.gmail.com>
- Authentication-results: zsh.org; iprev=pass (mail-wr1-f42.google.com) smtp.remote-ip=209.85.221.42; dkim=pass header.d=gmail.com header.s=20161025 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none
- Cc: "zsh-workers@xxxxxxx" <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=IXoMfKNoGtdwaiR1XVDSkcquy87Tmk4UVvExOayuE9g=; b=FArjrQtD2kg00f/FOfbBS05wu3P+xtr2wBKfIBYG+UEXgKhYTlLHCwzTczRNRZum0T LCqlwmRCITDJMewbszK759E8lfvc7wa6QLoJCaYpVVo3zuvF3jhuJjJosUkqgCdS0oIr MONRVplKTghBgvGFAUe2jcutxPwjXmwyu7KzZw88oQHp70JymGrmH7NdGvo6UQnRKuD9 jHeL1QedHU0lMSlkFd/B2T0vH14dzFFJXhWkZhfKd2ro+nr8j7zQdq1/lN29wN87Vc5k vHpwirsdP0KnaDi2LITIg68Ufqupj4zZ01tT40YDayQ+vJsg1WZoZSNd7Um7GgpvyJrq J5WQ==
- In-reply-to: <CAH+w=7a_p+a7ZvS5qQSX=YM_9AJP_t1c+cm=ht9bG-dePknjLg@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: <20201223234711.492603-1-felipe.contreras@gmail.com> <CAH+w=7Yzvqm0aPzeCvHje-s1CZmPj6CE4QBMTkK29QnhDvm_tA@mail.gmail.com> <CAMP44s3J0tWc7LHdjL8kuhBwUpOnpQsPzuVyxVH_PzwP=G9w3Q@mail.gmail.com> <CAH+w=7a_p+a7ZvS5qQSX=YM_9AJP_t1c+cm=ht9bG-dePknjLg@mail.gmail.com>
- Sender: zsh-workers-request@xxxxxxx
On Mon, Dec 28, 2020 at 3:00 PM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
>
> On Mon, Dec 28, 2020 at 12:09 PM Felipe Contreras
> <felipe.contreras@xxxxxxxxx> wrote:
> >
> > On Sun, Dec 27, 2020 at 4:06 PM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> > >
> > > On Wed, Dec 23, 2020 at 3:47 PM Felipe Contreras
> > > <felipe.contreras@xxxxxxxxx> wrote:
> > > >
> > > One other thing that has me scratching my head about your patch ... I
> > > can't see any reason why it matters that the bit value is (1<<30), but
> > > if I try, for example, overloading (1<<22) as I did for PM_DECLARED,
> > > the argument lists of shell functions stop working.
> >
> > Because some variables have initially the flag PM_DONTIMPORT (1<<22),
> > for example IFS, so it's like initially they don't have any value
> > (i.e. PM_NULL).
>
> Yes, but nothing ever looks at PM_DONTIMPORT after setting up the
> parameter table,
Not PM_DONTIMPORT, but PM_NULL (which have the same value).
> and how did the positional parameters get involved,
static initparam argvparam_pm = IPDEF9("", &pparams, NULL, \
PM_ARRAY|PM_SPECIAL|PM_DONTIMPORT);
> and why does that NOT happen on the "raw" declarednull branch?
Because in that branch you never check PM_DECLARED alone; it's always
with PM_UNSET.
> I guess it has to be something that's not in your diff but that's
> looking for exactly the PM_NULL bit-pattern, such that omitting
> PM_UNSET makes that comparison fail.
Yes.
Perhaps clearing the flag after calling dontimport() would make sense.
--
Felipe Contreras
Messages sorted by:
Reverse Date,
Date,
Thread,
Author