diff options
author | Peter Stephenson <pws@zsh.org> | 2017-10-04 09:18:51 +0100 |
---|---|---|
committer | Peter Stephenson <pws@zsh.org> | 2017-10-04 09:18:51 +0100 |
commit | e573857a033504f7918c4a2309151329820f115f (patch) | |
tree | 18c7bb903e0fe9536dd102d6691c8b3e1a397230 /Src/parse.c | |
parent | 174e560a23e40725cd0b50669a52d831342e5246 (diff) | |
download | zsh-e573857a033504f7918c4a2309151329820f115f.tar.gz zsh-e573857a033504f7918c4a2309151329820f115f.tar.xz zsh-e573857a033504f7918c4a2309151329820f115f.zip |
41802 (minor tweaks): use heap during shell function call.
Replaces stack for more efficient memory management. Also fix debug message when FUNCNEST is increased.
Diffstat (limited to 'Src/parse.c')
-rw-r--r-- | Src/parse.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Src/parse.c b/Src/parse.c index 6e0856bbc..5fe3ebd2c 100644 --- a/Src/parse.c +++ b/Src/parse.c @@ -2742,7 +2742,8 @@ freeeprog(Eprog p) DPUTS(p->nref < 0 && !(p->flags & EF_HEAP), "Real EPROG has nref < 0"); DPUTS(p->nref < -1, "Uninitialised EPROG nref"); #ifdef MAX_FUNCTION_DEPTH - DPUTS(p->nref > MAX_FUNCTION_DEPTH + 10, "Overlarge EPROG nref"); + DPUTS(zsh_funcnest >=0 && p->nref > zsh_funcnest + 10, + "Overlarge EPROG nref"); #endif if (p->nref > 0 && !--p->nref) { for (i = p->npats, pp = p->pats; i--; pp++) |