Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [bug] "zmodload -F zsh/system -p:errnos" disables $sysparams instead of $errnos
On Wed, 7 Sep 2016 10:39:18 +0100
Stephane Chazelas <stephane.chazelas@xxxxxxxxx> 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))
Messages sorted by:
Reverse Date,
Date,
Thread,
Author