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 28099 invoked from network); 28 Dec 2020 21:59:17 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 28 Dec 2020 21:59:17 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1609192757; b=X10ZzRtpqoivxv8nbQtPmTxCGweoQ1Lh2WT61OpcYmQu4uyokhy5Uu5GxExibOEUmUtJwvBasp n2GaHjgkbPCTfyc5215FmyyrsptQu/65mNRGOqOcn1jBt83dt3nFrUCWm/eFhvngjvNrXVz+e6 3rk21xgQqXimEmxWsixnC5cC7VTR921Zir1oY0eTW2OJjEWK5ejwOSZezIIYR4acAdUBSTfWSD XQ2/KjGDGDweR91SKPXPFPqUuom28n96j/DkgaqxEPRivPKaGhJV++6CMujzW0Ho2gev2tTnHO JzXlFf7WsTuWW09HA3kK/y1VieZiGogASGhSoeUq6SlQHw==; ARC-Authentication-Results: i=1; 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1609192757; bh=wT6WwrURn2pJ03kb+IHHENGACityE6c/hjyO+9xoIQ4=; 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=Q+hpZKmt5OZMASDAZC3KJ/WdKTo/x7aQMCHfvYQR+U0BgI4fApeMWKPmvHHXeoOe2zYznJ5f3t P4jlbOpCHQ/NzyIUclTa4vphcIcUza73bjjxprdGg9xvtx1bYKLDXwi84Kkjzu7109vvgcsoM9 3IIyiq9HLbb9almCDYxpsRKvkGOZgdsONBkAWlrCWxo3wfW814RCF5c44mJILsHU4s6Apirf2W 3KNUTMbHT8y8UHLnAHhEvon6HpK5NADrx9Vd22h5sY9tDmIFkUaD6y3JbFgu1Aib2k4rVweJzu q49wSaeXoa4chU1Je0Xd06Knd1gWvFoSw3uT7Lfzl1phsA==; 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=IXoMfKNoGtdwaiR1XVDSkcquy87Tmk4UVvExOayuE9g=; b=DAbw+FoBmHnBm5j58tBFNwvNGH KVnKmLho/GuBVcjVcp1xZctoUBGwYCtq9bfCr2FF8DnPW9mSqXxZ4zB3h+E1CSn9B3wil+HJao0Cl 2UCqBbIxZ1Wmpn4XIpc8GgCZEl4g1RYbZpOr8nAYFj1qeay7oq1n0ir4K/q785c8xv6gkph2SZz84 nqTvw2JCAmedsOP02spNKOtEphkuF0AOb1VopuhfPbXjUuW5xjF6s+Tk+gc9R6V56/8AafqB/mB/M 5QEpg0ZyRozdrc67SsIcpEqivX+65P1B3K5wzwogYgRpZA8IkvrehAySqpjUTB6cOBpHqzEimDYnr FhzR0oTw==; Received: from authenticated user by zero.zsh.org with local id 1ku0Xt-000Fu3-CV; Mon, 28 Dec 2020 21:59:17 +0000 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 Received: from mail-wr1-f42.google.com ([209.85.221.42]:43141) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1ku0Xc-000Fl6-D9; Mon, 28 Dec 2020 21:59:01 +0000 Received: by mail-wr1-f42.google.com with SMTP id y17so12578113wrr.10 for ; Mon, 28 Dec 2020 13:59:00 -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=IXoMfKNoGtdwaiR1XVDSkcquy87Tmk4UVvExOayuE9g=; b=FArjrQtD2kg00f/FOfbBS05wu3P+xtr2wBKfIBYG+UEXgKhYTlLHCwzTczRNRZum0T LCqlwmRCITDJMewbszK759E8lfvc7wa6QLoJCaYpVVo3zuvF3jhuJjJosUkqgCdS0oIr MONRVplKTghBgvGFAUe2jcutxPwjXmwyu7KzZw88oQHp70JymGrmH7NdGvo6UQnRKuD9 jHeL1QedHU0lMSlkFd/B2T0vH14dzFFJXhWkZhfKd2ro+nr8j7zQdq1/lN29wN87Vc5k vHpwirsdP0KnaDi2LITIg68Ufqupj4zZ01tT40YDayQ+vJsg1WZoZSNd7Um7GgpvyJrq J5WQ== 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=IXoMfKNoGtdwaiR1XVDSkcquy87Tmk4UVvExOayuE9g=; b=qfUb5owiJWLXehWipZP9YsAWZOM6v0Db6lsR8K85HOKDYnT3HxdanypAao37Rvbl3J KB4S87nyltpiBXhYIHM15+Mgz5i7UlfRBXBElD4DOwuPHdMKQWGduRMFAyc1EHGhwzPU Yjd1xE1Pi9V67wEzbJnd/TJeTwzdTC4HummjlO3hncXBCN3WfZhv5xx0g/MH0OJNFtpw Rx4tHIz+T9joynxyiKpzz9xSbA+xS9JJFPoxYYq3jilZIQZkgfSalqxd1ou6s/Wr7S8k 4zTlgb1HcWdhgxKdD6l0te3SsFvPX0xXo4kilBnw9Vn+GrzOattd44zP712fCwUglxzs TXyA== X-Gm-Message-State: AOAM531dzRVZs3TNPFAbUoTajF/pjVzXfi0KS3GunTP5wPE8TA0apAAU tv6uePOSxVx7w1QVVILTi7TjicI0l580UyvKWrTmiFv2Jspclw== X-Google-Smtp-Source: ABdhPJwxe84vrxT51i4vXimto6VJ3zUvDLd1lBylpF+qRquv1qDPd5m9ZY1xBqQL3SRTcdg2xxjDZogVkVSzeojgGto= X-Received: by 2002:adf:ce90:: with SMTP id r16mr53574188wrn.100.1609192739829; Mon, 28 Dec 2020 13:58:59 -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 15:58:48 -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: 47775 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 Mon, Dec 28, 2020 at 3:00 PM Bart Schaefer wrote: > > On Mon, Dec 28, 2020 at 12:09 PM Felipe Contreras > wrote: > > > > On Sun, Dec 27, 2020 at 4:06 PM Bart Schaefer wrote: > > > > > > On Wed, Dec 23, 2020 at 3:47 PM Felipe Contreras > > > 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