Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: make ${(k)gdbmhash} work



ztie -d db/gdbm -f /tmp/newfile.db hokeypokey
hokeypokey[horse]=buggy
hokeypokey[apple]=pie
print -l -- ${hokeypokey}
print ${hokeypokey[horse]}
print ${hokeypokey[apple]}
print -l -- ${(k)hokeypokey}

Index: Src/Modules/db_gdbm.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Modules/db_gdbm.c,v
retrieving revision 1.3
diff -u -r1.3 db_gdbm.c
--- Src/Modules/db_gdbm.c	21 Jul 2008 02:24:03 -0000	1.3
+++ Src/Modules/db_gdbm.c	21 Jul 2008 02:31:39 -0000
@@ -191,6 +191,7 @@
     while(key.dptr) {
 	content = gdbm_fetch(dbf, key);
 
+	pm->node.nam = key.dptr;
 	pm->u.str = content.dptr;
 	pm->gsu.s = &nullsetscalar_gsu;
 



Messages sorted by: Reverse Date, Date, Thread, Author