Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: make ${(k)gdbmhash} work
- X-seq: zsh-workers 25322
- From: Clint Adams <clint@xxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: PATCH: make ${(k)gdbmhash} work
- Date: Mon, 21 Jul 2008 02:33:07 +0000
- In-reply-to: <20080721014412.GA23562@xxxxxxxx>
- Mail-followup-to: zsh-workers@xxxxxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20080721001634.GA20601@xxxxxxxx> <20080721005152.GA21796@xxxxxxxx> <20080721014412.GA23562@xxxxxxxx>
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