From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13594 invoked by alias); 7 Sep 2016 10:35:39 -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: 39218 Received: (qmail 1418 invoked from network); 7 Sep 2016 10:35:39 -0000 X-Qmail-Scanner-Diagnostics: from mailout3.w1.samsung.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(210.118.77.13):SA:0(-1.1/5.0):. Processed in 0.421071 secs); 07 Sep 2016 10:35:39 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=RP_MATCHES_RCVD autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: p.stephenson@samsung.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at samsung.com does not designate permitted sender hosts) X-AuditID: cbfec7f5-f792e6d0000013f5-f6-57cfed740c85 Date: Wed, 07 Sep 2016 11:35:29 +0100 From: Peter Stephenson To: zsh-workers@zsh.org Subject: Re: [bug] "zmodload -F zsh/system -p:errnos" disables $sysparams instead of $errnos Message-id: <20160907113529.71060cf4@pwslap01u.europe.root.pri> In-reply-to: <20160907093918.GB11851@chaz.gmail.com> References: <20160907093918.GB11851@chaz.gmail.com> Organization: Samsung Cambridge Solution Centre X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; i386-redhat-linux-gnu) MIME-version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrILMWRmVeSWpSXmKPExsVy+t/xK7olb8+HGyxpN7Q42PyQyYHRY9XB D0wBjFFcNimpOZllqUX6dglcGd/WrmYr6OWouPPpFVsD4zq2LkZODgkBE4mWq92MELaYxIV7 64HiXBxCAksZJQ5N6WCEcGYwSdxoO8wC4ZxmlLh6o4sZwjnDKLH/VysrSD+LgKrEzvVtYDab gKHE1E2zweaKCIhLnF17ngXEFhaIk5iwqQWshlfAXuJv43ZmEJsT6I7XzZvAbhISMJaY3jID rJ5fQF/i6t9PTBD32UvMvHKGEaJXUOLH5HtgNcwCWhKbtzWxQtjyEpvXvGWGmKMucePubvYJ jMKzkLTMQtIyC0nLAkbmVYyiqaXJBcVJ6blGesWJucWleel6yfm5mxghAf11B+PSY1aHGAU4 GJV4eCt2nwsXYk0sK67MPcQowcGsJMJ75vX5cCHelMTKqtSi/Pii0pzU4kOM0hwsSuK8M3e9 DxESSE8sSc1OTS1ILYLJMnFwSjUwyiadTuUv6l5e5dzuv5atXMP492FO27uPXbef6NXl8+FZ /iT2RqXvyvchs0/9+Ca2snK9kUek8ekH175N3bf7y4JMW25Rs2QfJT+XI49uq2+/rsVucUR4 R86h6ervIrY49l/6ztgofOPE/qxF77dypxr+UZM3Uaji7f2ktFHJyvZ32Lwviy3klFiKMxIN tZiLihMBxXyS5mQCAAA= On Wed, 7 Sep 2016 10:39:18 +0100 Stephane Chazelas wrote: > $ zmodload -F zsh/system -p:errnos > $ zmodload -Fl zsh/system > +b:syserror > +b:sysread > +b:syswrite > +b:sysopen > +b:sysseek > +b:zsystem > +f:systell > +p:errnos !!! > -p:sysparams !!! It looks like this is because math functions were never properly counted --- there are very few in modules so no one noticed. We could do with some tests for this. (I suspect it worked if you fired the blue portal at the wall over math functions, then the orange portal onto the floor, and jumped through it.) diff --git a/Src/module.c b/Src/module.c index 368254c..46a7d77 100644 --- a/Src/module.c +++ b/Src/module.c @@ -3350,6 +3350,8 @@ setfeatureenables(Module m, Features f, int *e) if (f->mf_size) { if (setmathfuncs(m->node.nam, f->mf_list, f->mf_size, e)) ret = 1; + if (e) + e += f->mf_size; } if (f->pd_size) { if (setparamdefs(m->node.nam, f->pd_list, f->pd_size, e))