Commit Graph

4 Commits

Author SHA1 Message Date
Jeff Epler adfa6ef019
Fix all natmod tests to run on x64
My testing sequence is

```
git clean -dxf examples
arch=x64; make -C examples/natmod/features1 ARCH=$arch && make -C examples/natmod/features2 ARCH=$arch && make -C examples/natmod/btree ARCH=$arch && make -C examples/natmod/framebuf ARCH=$arch && make -C examples/natmod/uheapq ARCH=$arch && make -C examples/natmod/urandom ARCH=$arch && make -C examples/natmod/ure ARCH=$arch && make -C examples/natmod/uzlib ARCH=$arch
(cd tests && ./run-natmodtests.py "$@" extmod/{btree*,framebuf*,uheapq*,ure*,uzlib*}.py)
```
2022-02-13 11:18:38 -06:00
Damien George 73c58150f5 extmod/modbtree: Retain reference to underlying stream so it's not GC'd.
For ports that have a system malloc which is not garbage collected (eg
unix, esp32), the stream object for the DB must be retained separately to
prevent it from being reclaimed by the MicroPython GC (because the
berkeley-db library uses malloc to allocate the DB structure which stores
the only reference to the stream).

Although in some cases the user code will explicitly retain a reference to
the underlying stream because it needs to call close() on it, this is not
always the case, eg in cases where the DB is intended to live forever.

Fixes issue #5940.
2020-05-02 16:08:04 +10:00
Jim Mussared c34e7b9d4c py/dynruntime.mk: Set MICROPY_ENABLE_DYNRUNTIME instead of per module.
So this setting could be used by other source files if needed.
2020-04-05 14:13:02 +10:00
Damien George 37817ab4ba examples/natmod: Add btree example. 2019-12-12 20:15:28 +11:00