about summary refs log tree commit diff
path: root/Src/Modules/db_gdbm.c
diff options
context:
space:
mode:
authorClint Adams <clint@users.sourceforge.net>2008-07-21 02:24:03 +0000
committerClint Adams <clint@users.sourceforge.net>2008-07-21 02:24:03 +0000
commit8954f31c7c33351deff85e0f419bb6abb2c4ca54 (patch)
treef1203b4ab84cf35dab99fb61195e773e0375caf3 /Src/Modules/db_gdbm.c
parentfdf44493380feb99f8cbb5222df648f23bdcb731 (diff)
downloadzsh-8954f31c7c33351deff85e0f419bb6abb2c4ca54.tar.gz
zsh-8954f31c7c33351deff85e0f419bb6abb2c4ca54.tar.xz
zsh-8954f31c7c33351deff85e0f419bb6abb2c4ca54.zip
25321: delete gdbm node when corresponding hash entry is unset.
Diffstat (limited to 'Src/Modules/db_gdbm.c')
-rw-r--r--Src/Modules/db_gdbm.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/Src/Modules/db_gdbm.c b/Src/Modules/db_gdbm.c
index d8f6724ea..ce7a6f57e 100644
--- a/Src/Modules/db_gdbm.c
+++ b/Src/Modules/db_gdbm.c
@@ -132,7 +132,6 @@ gdbmsetfn(Param pm, char **val)
     datum key, content;
     int ret;
 
-
     key.dptr = pm->node.nam;
     key.dsize = strlen(key.dptr) + 1;
     content.dptr = val;
@@ -145,7 +144,13 @@ gdbmsetfn(Param pm, char **val)
 static void
 gdbmunsetfn(Param pm, int um)
 {
+    datum key;
+    int ret;
+
+    key.dptr = pm->node.nam;
+    key.dsize = strlen(key.dptr) + 1;
 
+    ret = gdbm_delete(dbf, key);
 }
 
 /**/