From: Daniel Elstner Date: Sun, 4 Oct 2015 23:53:43 +0000 (+0200) Subject: Python: Restrict code to stable ABI subset X-Git-Tag: libsigrokdecode-0.4.0~47 X-Git-Url: http://sigrok.org/gitweb/?a=commitdiff_plain;h=201a85a8ea071d37f4fda2668c0a1c488d852f4e;hp=201a85a8ea071d37f4fda2668c0a1c488d852f4e;p=libsigrokdecode.git Python: Restrict code to stable ABI subset 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. ---