summary refs log tree commit diff
path: root/Src/params.c
diff options
context:
space:
mode:
authorBarton E. Schaefer <schaefer@zsh.org>2015-11-08 12:44:31 -0800
committerBarton E. Schaefer <schaefer@zsh.org>2015-11-08 12:44:31 -0800
commit30b90f166ef0ca0883985461d498c066e4f723da (patch)
treef495e122d814d9216d8cf49985240a5a7b685f34 /Src/params.c
parent7277cc1bedaa335b96ce609b4390618358198c32 (diff)
downloadzsh-30b90f166ef0ca0883985461d498c066e4f723da.tar.gz
zsh-30b90f166ef0ca0883985461d498c066e4f723da.tar.xz
zsh-30b90f166ef0ca0883985461d498c066e4f723da.zip
37080: use paramtab abstraction more consistently, add explanatory comments
Diffstat (limited to 'Src/params.c')
-rw-r--r--Src/params.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/Src/params.c b/Src/params.c
index de456c144..3ed771e3b 100644
--- a/Src/params.c
+++ b/Src/params.c
@@ -447,7 +447,7 @@ newparamtable(int size, char const *name)
     ht->cmpnodes    = strcmp;
     ht->addnode     = addhashnode;
     ht->getnode     = getparamnode;
-    ht->getnode2    = getparamnode;
+    ht->getnode2    = gethashnode2;
     ht->removenode  = removehashnode;
     ht->disablenode = NULL;
     ht->enablenode  = NULL;
@@ -869,6 +869,7 @@ createparam(char *name, int flags)
 
     if (name != nulstring) {
 	oldpm = (Param) (paramtab == realparamtab ?
+			 /* gethashnode2() for direct table read */
 			 gethashnode2(paramtab, name) :
 			 paramtab->getnode(paramtab, name));
 
@@ -3111,7 +3112,8 @@ unsetparam(char *s)
 
     queue_signals();
     if ((pm = (Param) (paramtab == realparamtab ?
-		       gethashnode2(paramtab, s) :
+		       /* getnode2() to avoid autoloading */
+		       paramtab->getnode2(paramtab, s) :
 		       paramtab->getnode(paramtab, s))))
 	unsetparam_pm(pm, 0, 1);
     unqueue_signals();