Python bindings: work around Python 3.5 behaviour change
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 27 Oct 2015 20:10:03 +0000 (16:10 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 27 Oct 2015 20:12:09 +0000 (16:12 -0400)
commit1fa8e2371b9b7cb256cd6da67ad3326cb784ff00
tree4da7c651feb0f8319b2c9c80ce7a13e5dd9b778d
parent6246fd54ccebd72fc12f0d0885dd90b64094616e
Python bindings: work around Python 3.5 behaviour change

Python 3.5 changes the StopIteration exception clearing behaviour
when a generator finishes its iteration. This causes the
interpreter to errounously consider SWIG clean-up functions as
having "set an error".

This hack explicitly allocates and cleans up struct bt_iter_pos
instead of relying on SWIG auto-generated code which manages
the lifetime of temporary objects.

An investigation of the cause of this change is under way, but
at least this makes the bindings usable on Python 3.5 which is
being rolled-out in some distros.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
bindings/python/nativebt.i
bindings/python/python-complements.c
bindings/python/python-complements.h
bindings/python/reader.py
This page took 0.024386 seconds and 4 git commands to generate.