src/_custom.c:10:1: error: variable ‘CustomType’ has initializer but incomplete type
10 | static PyTypeObject CustomType = {
| ^~~~~~
In file included from /home/robin/LOCAL/3.7.16/include/python3.7m/Python.h:90,
from src/_custom.c:2:
/home/robin/LOCAL/3.7.16/include/python3.7m/object.h:90:5: error: extra brace group at end of initializer
90 | { PyObject_HEAD_INIT(type) size },
| ^
src/_custom.c:11:9: note: in expansion of macro ‘PyVarObject_HEAD_INIT’
11 | PyVarObject_HEAD_INIT(NULL, 0)
I am trying to split off reportlab C extensions to simplify installations and make use of more advanced packages.............
A simple extension is easily converted to being an abi3 module. However, another has a custom type which uses the old
style mechanisms here
it looks like I have to use a different mechanism to setup custom types in the abi3 world.
I looked in Modules/xxlimited_35.c, but that seems much more complex and provides for a type which supports GC.
Are there any ABI3 examples using the old style strategy?
--
Robin Becker
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 300 |
Nodes: | 16 (2 / 14) |
Uptime: | 64:49:26 |
Calls: | 6,712 |
Files: | 12,244 |
Messages: | 5,356,126 |