]> sigrok.org Git - libsigrokdecode.git/commitdiff
Python: Restrict code to stable ABI subset
authorDaniel Elstner <redacted>
Sun, 4 Oct 2015 23:53:43 +0000 (01:53 +0200)
committerDaniel Elstner <redacted>
Tue, 6 Oct 2015 21:25:36 +0000 (23:25 +0200)
Limit usage of the Python C API to the stable ABI subset as defined
by PEP 384. This removes some type definitions and functions which
libsigrokdecode made use of. Convert all affected code to suitable
API alternatives. Also fix a few leaks that became apparent while
working on the code.

The most visible change is that PyTypeObject is now an opaque type.
Thus, the custom Decoder and srd_logic types are now created on the
heap via an alternative API. Unfortunately, since tp_name is now
inaccessible, type names had to be removed from the log output.

Stack traces after Python exceptions are now formatted by calling
into Python, since the trace object C API is no longer available.


No differences found