From b8b2525576ccca9c33629de71557e4204abde766 Mon Sep 17 00:00:00 2001 From: Damien George Date: Tue, 14 Aug 2018 17:41:23 +1000 Subject: [PATCH] extmod/modbtree: Update to work with new mp_stream_posix_XXX signatures. --- extmod/modbtree.c | 2 +- py/py.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/extmod/modbtree.c b/extmod/modbtree.c index 8b76885809..a2bff06d44 100644 --- a/extmod/modbtree.c +++ b/extmod/modbtree.c @@ -352,7 +352,7 @@ STATIC mp_obj_t mod_btree_open(size_t n_args, const mp_obj_t *pos_args, mp_map_t openinfo.psize = args.pagesize.u_int; openinfo.minkeypage = args.minkeypage.u_int; - DB *db = __bt_open(pos_args[0], &btree_stream_fvtable, &openinfo, /*dflags*/0); + DB *db = __bt_open(MP_OBJ_TO_PTR(pos_args[0]), &btree_stream_fvtable, &openinfo, /*dflags*/0); if (db == NULL) { mp_raise_OSError(errno); } diff --git a/py/py.mk b/py/py.mk index 27565948d5..d6392e9973 100644 --- a/py/py.mk +++ b/py/py.mk @@ -77,7 +77,7 @@ endif ifeq ($(MICROPY_PY_BTREE),1) BTREE_DIR = lib/berkeley-db-1.xx -BTREE_DEFS = -D__DBINTERFACE_PRIVATE=1 -Dmpool_error=printf -Dabort=abort_ -Dvirt_fd_t=mp_obj_t "-DVIRT_FD_T_HEADER=" $(BTREE_DEFS_EXTRA) +BTREE_DEFS = -D__DBINTERFACE_PRIVATE=1 -Dmpool_error=printf -Dabort=abort_ "-Dvirt_fd_t=void*" $(BTREE_DEFS_EXTRA) INC += -I$(TOP)/$(BTREE_DIR)/PORT/include SRC_MOD += extmod/modbtree.c SRC_MOD += $(addprefix $(BTREE_DIR)/,\