I am trying to port an existing C Python extension to use the Py_LIMITED_API, so that we don't have to build the extension for all the python versions we support.
One of the issues I'm facing is, that this library provides a type that subclasses the python float type.
The last official documentation with examples ( https://docs.python.org/3.5/extending/newtypes.html#subclassing-other-types) does not mention the limited API, and I'm facing the problem, that PyFloatObject is not part of the stable ABI, which would be necessary to create the base struct:
typedef struct {
PyFloatObject base;
int state;
} SubclassedFloat;
Is there a way to subclass a builtin type when using Py_LIMITED_API, especially float, or is this impossible?