add prototypes for traversal api

master
leitner 19 years ago
parent 276f370e69
commit 35c01d480b

@ -29,7 +29,14 @@ extern void cdb_findstart(struct cdb *);
extern int cdb_findnext(struct cdb *,const unsigned char *,unsigned long int);
extern int cdb_find(struct cdb *,const unsigned char *,unsigned long int);
extern int cdb_firstkey(struct cdb *c,uint32 *kpos);
extern int cdb_nextkey(struct cdb *c,uint32 *kpos);
extern int cdb_successor(struct cdb *c,const unsigned char *,unsigned long int);
#define cdb_datapos(c) ((c)->dpos)
#define cdb_datalen(c) ((c)->dlen)
#define cdb_keypos(c) ((c)->kpos)
#define cdb_keylen(c) ((c)->dpos-(c)->kpos)
#endif

@ -27,7 +27,7 @@ int cdb_nextkey(struct cdb *c,uint32 *kpos) {
return doit(c,kpos);
}
int cdb_successor(struct cdb *c,unsigned char *key,unsigned long int klen) {
int cdb_successor(struct cdb *c,const unsigned char *key,unsigned long int klen) {
int r;
uint32 kpos;
if (key) {

Loading…
Cancel
Save