From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28855 invoked by alias); 21 Feb 2015 22:54:53 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 34599 Received: (qmail 15724 invoked from network); 21 Feb 2015 22:54:51 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-CMAE-Score: 0 X-CMAE-Analysis: v=2.1 cv=D5rw8UVm c=1 sm=1 tr=0 a=FT8er97JFeGWzr5TCOCO5w==:117 a=kj9zAlcOel0A:10 a=q2GGsy2AAAAA:8 a=oR5dmqMzAAAA:8 a=-9mUelKeXuEA:10 a=0HtSIViG9nkA:10 a=PbIgpOsG4WekPHa2HssA:9 a=CjuIK1q_8ugA:10 From: Bart Schaefer Message-id: <150221145441.ZM23213@torch.brasslantern.com> Date: Sat, 21 Feb 2015 14:54:41 -0800 In-reply-to: <20150221222712.49d49b88@ntlworld.com> Comments: In reply to Peter Stephenson "Re: Builtin strftime and TZ assignments" (Feb 21, 10:27pm) References: <150221102305.ZM26540@torch.brasslantern.com> <150221124546.ZM8579@torch.brasslantern.com> <20150221222712.49d49b88@ntlworld.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: Builtin strftime and TZ assignments MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Feb 21, 10:27pm, Peter Stephenson wrote: } Subject: Re: Builtin strftime and TZ assignments } } On Sat, 21 Feb 2015 12:45:46 -0800 } Bart Schaefer wrote: } > However, I'm hoping someone (PWS?) can explain why the extra pm->level } > bump is necessary to get the parameter to be removed from the environment } > upon endparamscope(). } } I don't know. Is it necessary? Without it, starting from an unset TZ, doing torch% TZ=UTC strftime ... results in TZ remaining set to UTC after strftime completes. With the pm->level bump, TZ is back to unset again after strftime completes. } The code in params.c that deals with } locallevel suggests it shouldn't be. If I skip the createparam() [necessary for PM_EXPORT] and instead just setsparam(), then the parameter is properly removed from scope as I would expect, but of course then strptime() doesn't work as desired. So it has something to do with export? I briefly considered adding an ASSPM_EXPORTED flag and changing the behavior of assignstrvalue() in params.c, but decided against it.