diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2007-07-06 21:52:38 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2007-07-06 21:52:38 +0000 |
commit | 1b52f47cf285d5f3835bce7ad73f360bd327d4e8 (patch) | |
tree | af5f6637517084bc7914dacfc7fda0a5799f3220 /Src/params.c | |
parent | 018c9a2708808b83d5962786f759a931ab27511d (diff) | |
download | zsh-1b52f47cf285d5f3835bce7ad73f360bd327d4e8.tar.gz zsh-1b52f47cf285d5f3835bce7ad73f360bd327d4e8.tar.xz zsh-1b52f47cf285d5f3835bce7ad73f360bd327d4e8.zip |
23665: autoloading of module features and related tweaks
Diffstat (limited to 'Src/params.c')
-rw-r--r-- | Src/params.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/Src/params.c b/Src/params.c index 5609437a2..46da87580 100644 --- a/Src/params.c +++ b/Src/params.c @@ -411,7 +411,7 @@ newparamtable(int size, char const *name) /**/ static HashNode -getparamnode(HashTable ht, char *nam) +getparamnode(HashTable ht, const char *nam) { HashNode hn = gethashnode2(ht, nam); Param pm = (Param) hn; @@ -419,12 +419,16 @@ getparamnode(HashTable ht, char *nam) if (pm && pm->u.str && (pm->node.flags & PM_AUTOLOAD)) { char *mn = dupstring(pm->u.str); - if (ensurefeature(mn, "p:", nam)) - return NULL; + (void)ensurefeature(mn, "p:", (pm->node.flags & PM_AUTOALL) ? NULL : + nam); hn = gethashnode2(ht, nam); - if (((Param) hn) == pm && (pm->node.flags & PM_AUTOLOAD)) { - pm->node.flags &= ~PM_AUTOLOAD; - zwarnnam(nam, "autoload failed"); + if (!hn) { + /* + * This used to be a warning, but surely if we allow + * stuff to go ahead with the autoload stub with + * no error status we're in for all sorts of mayhem? + */ + zerr("unknown parameter: %s", nam); } } return hn; |