Skip to content

Commit d7b6a90

Browse files
author
CaCO3
committed
fix migrator build errors: kccurfirst→kccurjump, mdb_open macro conflict, comment warning
1 parent d08836e commit d7b6a90

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

migrator/migrator.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ typedef struct {
4242

4343
/* Iteration ---------------------------------------------------
4444
* iter_new() – create an iterator positioned before the first record.
45-
* iter_next() – advance and fill *key/*val with malloc'd buffers;
45+
* iter_next() – advance and fill *key, *val with malloc'd buffers;
4646
* caller must free() both. Returns 1, or 0 when done.
4747
* iter_free() – destroy the iterator.
4848
*/
@@ -167,7 +167,7 @@ static void *kc_iter_new(void *h)
167167
{
168168
kc_iter_t *it = malloc(sizeof *it);
169169
it->cur = kcdbcursor((KCDB *)h);
170-
kccurfirst(it->cur);
170+
kccurjump(it->cur);
171171
return it;
172172
}
173173

@@ -419,7 +419,7 @@ static const backend_ops_t sq_ops = {
419419
typedef struct { MDB_env *env; MDB_dbi dbi; MDB_txn *txn; } mdb_handle_t;
420420
typedef struct { MDB_cursor *cur; int started; } mdb_iter_t;
421421

422-
static void *mdb_open(const char *path, int readonly)
422+
static void *mdb_be_open(const char *path, int readonly)
423423
{
424424
mdb_handle_t *h = malloc(sizeof *h);
425425
unsigned int env_flags = MDB_NOSUBDIR;
@@ -503,7 +503,7 @@ static void mdb_iter_free(void *iter)
503503

504504
static const backend_ops_t mdb_ops = {
505505
"lmdb",
506-
mdb_open, mdb_be_close, mdb_be_put,
506+
mdb_be_open, mdb_be_close, mdb_be_put,
507507
mdb_iter_new, mdb_iter_next, mdb_iter_free
508508
};
509509
#endif /* HAVE_LMDB */

0 commit comments

Comments
 (0)