summaryrefslogtreecommitdiff
path: root/ext/dba/dba_cdb.c
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2002-11-03 16:43:07 +0000
committerMarcus Boerger <helly@php.net>2002-11-03 16:43:07 +0000
commitaaf5911b161d6feb00beabed8465bec9fd5c88b3 (patch)
tree9fb5c419f4b5879f188fa958c6276ba1d7ad7ab9 /ext/dba/dba_cdb.c
parenta078f6ecc62f92a202b89afd24262593e4ae73a6 (diff)
downloadphp-git-aaf5911b161d6feb00beabed8465bec9fd5c88b3.tar.gz
cdb now allows multiple key-value pairs with same key
Diffstat (limited to 'ext/dba/dba_cdb.c')
-rw-r--r--ext/dba/dba_cdb.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ext/dba/dba_cdb.c b/ext/dba/dba_cdb.c
index e4b2a77de4..37b525135d 100644
--- a/ext/dba/dba_cdb.c
+++ b/ext/dba/dba_cdb.c
@@ -95,7 +95,13 @@ DBA_FETCH_FUNC(cdb)
unsigned int len;
char *new_entry = NULL;
+// cdb_findstart(&cdb->c);
if (cdb_find(&cdb->c, key, keylen) == 1) {
+ while(skip--) {
+ if (cdb_findnext(&cdb->c, key, keylen) != 1) {
+ return NULL;
+ }
+ }
len = cdb_datalen(&cdb->c);
new_entry = emalloc(len+1);