Hi all,
In my project, I expose some C enums of a C library that I work with to the Python users using .pyx and .pxd files as follows:
dummy.pyx:
cdef extern from '<SOME_LIB/HEADER.h>':
cpdef enum dummy:
DUMMY_1
DUMMY_2
ETC
So far so good, but now with Cython3 there are no cpdef variables anymore and the compilation fails.
Changing the cpdef to cdef will no longer be accessible by python users...
What is the right thing to do in this case?
I thought of assigning a new module variables as a workaround - but that would be just lame and funny:
cdef extern from '<SOME_LIB/HEADER.h>':
cpdef enum dummy:
DUMMY_1_ "DUMMY_1"
DUMMY_2_ "DUMMY_2"
ETC_ "ETC"
DUMMY_1 = DUMMY_1_
DUMMY_2 = DUMMY_2_
ETC = ETC_
What is the right way to fix this?
Thanks in advance!