Python bindings: work around Python 3.5 behaviour change
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 29 Feb 2016 20:08:15 +0000 (15:08 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 29 Feb 2016 20:08:15 +0000 (15:08 -0500)
commit9132dc67804f7e868c21f759bf739ace4ce069b6
tree29a9ef659edac234ce92dc8aecc7daa931b7d039
parent0e1b84aa80398d5573b73ae4d6ae79d6a930a2fd
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/babeltrace.i.in
bindings/python/python-complements.c
bindings/python/python-complements.h
This page took 0.033477 seconds and 4 git commands to generate.