From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 15394 invoked from network); 28 Dec 2020 20:09:29 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 28 Dec 2020 20:09:29 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1609186169; b=FRziIpPNQ+f77m+CjnpNn7tU2bUUHWLvigDrbolRbc20nOhKiYcC7DYooLdxzxqq7m92ihyE2b Z1FdSW7wHoK4ys5bd1U8E6q7KzK1+ZE+vbT2eW15mk6qeB2Xn94WU5gK8qnq4cPyq0kClT8q9U 0aKFpzH1tlCEvaB/BNSlnAq8qFgBLYz+m88eJauTURr9Jq8VNgA+qh4MScME/Bo8xxCCroWv2f Hp0DkZryLcAO878w3oziRGuvf/kmAnRi6hfSZ09qEPlLUF1CvZan8wWgj45pwxqEf7Bs56ng73 jHCg0Y/y/WvAC7LMdjFcdFxz7qSH3cCFMiCMxJkSohHp7Q==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-wr1-f46.google.com) smtp.remote-ip=209.85.221.46; dkim=pass header.d=gmail.com header.s=20161025 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1609186169; bh=jSQaFIRIWQg5kxhERwpPZ7/aokF8O5h95AkpgWE6YDk=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=nuONUO5l7YY0KrciBccBe4ppsOppI5UNBjKwWNaw++8wljkBPhl91vXJyxcxMvljMRAhmI85QK tlq4n04ZeR0T3HaLsbeJ1yD48MFyOxkI/jKBzFHLe8YXyqGuRkGgVEkfmonc1TJzzUU5Jfi9m5 +NS31LOfgzb+EBhRkuLkPc6abjXtR7mPDl46qBt69HBTsoJ7xvrZE3uCtwW/5cfOiCQc7F/TfL PC2le+NuVNHsGIlrhaj1gtKmw3wXnFYPjugEA5gz7pVVh3d34dylje9D186v59BOZA03Pb7NiT BsG1XEcUHUDkQkEMtc0qoGe3pgfAHe3ufK4mzlKQPeON8Q==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID :Date:From:In-Reply-To:References:MIME-Version:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=IrObWrOWl0lVvfV5h1QTPiYibbHJtCL70VuPHheTWRw=; b=BbqoaprH4xfkZjrUqFbKJq4AKj ORMTO6jPxRHGdxtSHwfPLZj3t/QvsCU8I38Q3tnJydCAyM1aBuZzfCcix1XyI2LgprFjIGelr7mIv R5iK7ZM8hmAwG6F+VA0cn1VBjsB6a5WM+unoWAIERq4tWh/XvAC6fkchB3GyNJ4bnGjAOk/W4x4U3 iEaT2uiUJjOAromArwa+f5vB+JQRUWHf9+ZWOvrzbUFLSFGNur6gJzaguj4O5rQHegWk8kDz3J+g+ QPAE+vgkJp2NXtasObswFBMLyaV/V1fodmg0HvtP9hbX794sz2any1+LCmR+zv/uq0WPnisjD1exF UNDGCsrA==; Received: from authenticated user by zero.zsh.org with local id 1ktypd-000C7C-0a; Mon, 28 Dec 2020 20:09:29 +0000 Authentication-Results: zsh.org; iprev=pass (mail-wr1-f46.google.com) smtp.remote-ip=209.85.221.46; dkim=pass header.d=gmail.com header.s=20161025 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-wr1-f46.google.com ([209.85.221.46]:36694) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1ktypI-000ByS-6e; Mon, 28 Dec 2020 20:09:09 +0000 Received: by mail-wr1-f46.google.com with SMTP id t16so12420898wra.3 for ; Mon, 28 Dec 2020 12:09:08 -0800 (PST) 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=IrObWrOWl0lVvfV5h1QTPiYibbHJtCL70VuPHheTWRw=; b=koO3Xjbn92Qp+BPdzN7xLVe+jMHHwn5UWnkksf62kJAiu6GCZZ6vS7KXa/mfffAMMV v9H5Ac6cKO2iV0IEc3x85lgcC+5xrXrjZKR5rjsoNNV1SfMIGQhUDiAvcKCbK22qGkun JVPSeTic+63jfDo/3KC7T9lyVWtUlIqVp7LtZn/zMBui98OCQvehxmmSy7G5OH+EJV6D l2rYe8Jlw4efllUz3FniMXGcHrtuj50X6JBqgvfpubRemxgzV9NN8erao25nYXMcT8Oc cG5MubMcqFo8WoTqiAGn/gvGK9nt3THEva2mPrnpc8GaVW0UtNhkOpe1nixd76hb/EcO St4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=IrObWrOWl0lVvfV5h1QTPiYibbHJtCL70VuPHheTWRw=; b=af60W7iA2AqlmPOFo80h2OfZNdBmqQeCupH63sfjS3FlUuJSZwE9h9XlE+TlqUOn1f sjs0Zltm5MZc4OV3gbVPIf9fmWp8EOkmN6eVFN17Wn1RPj6YKTgmY61/wOEiY74GKR4t JalnXpdZx3tPEKNZ29z9atpvWxxIHWojJm6x78wEItsy/Uhc7NL3atwB4ySjL0FJ7yl3 /M9j6gwq+8mVI1F+r95DCtKlqg8qNKgs1I0tP8gUnc0DFXIOTHfLAfVlTyqInuZTWtgh p7TatP1alIXxf19Cyb9EYnEVYkwsu5YWonhfbREBJ1YwUNx1yHzeyh5oCx+lv4d4mN9k WQEQ== X-Gm-Message-State: AOAM533Bhi6dGJRGDvDV79eI2KiBCVUMZha2keTuHOAKe2ZGsKpF9FUm zKQQe9aqG0++jYfNIDTg5NxCdVWH9SnZ4ZyyVnTuvyoVLZ2KRg== X-Google-Smtp-Source: ABdhPJyVykyqlcoHSbnTe25JtHQw1BJOHRLMwkhfOAODTxJpTQzJsnwBvYJw+u/MiPsx0H3+kaeIwgE+m41TI4AoyQ4= X-Received: by 2002:a5d:4f0e:: with SMTP id c14mr52480691wru.84.1609186147224; Mon, 28 Dec 2020 12:09:07 -0800 (PST) MIME-Version: 1.0 References: <20201223234711.492603-1-felipe.contreras@gmail.com> In-Reply-To: From: Felipe Contreras Date: Mon, 28 Dec 2020 14:08:56 -0600 Message-ID: Subject: Re: [PATCH] declarednull: felipec's approach To: Bart Schaefer Cc: "zsh-workers@zsh.org" Content-Type: text/plain; charset="UTF-8" X-Seq: 47770 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: Archived-At: On Sun, Dec 27, 2020 at 4:06 PM Bart Schaefer wrote: > > On Wed, Dec 23, 2020 at 3:47 PM Felipe Contreras > wrote: > > > > I added a test that shows a discrepancy I found (${(t)var}) but there > > could be many, may more. I only checked one instance of PM_UNSET. > > Here's one that your patch gets (I think) wrong: > > ubuntu% setopt posixbuiltins > ubuntu% () { > function> readonly foo > function> typeset -p foo > function> print x${(t)foo}x > function> } > xx > ubuntu% > > (Note "typeset -p" output nothing.) On declarednull without your patch: > > ubuntu% setopt posixbuiltins > ubuntu% () { > function> readonly foo > function> typeset -p foo > function> print x${(t)foo}x > function> } > typeset -g -r foo > xx > ubuntu% > > The typeset output probably comes down to your third hunk in > Src/params.c (printparamnode), although I'm not certain what the > correct fix is, and I don't know what's up with ${(t)foo}. The > behavior with your patch changes if it's done this way: I see. I would need to check that case. > 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). Cheers. -- Felipe Contreras