-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
I understand IGNORE_DECLARATIONS prunes typedefs from _fake_typedefs.h, which are anyway deliberately incorrect (fake). But that leaves my cython declarations with undeclared data types:
cdef extern from "components/offset_filter.h":
ctypedef bool Comp_Success
cdef struct If_Signal_Array:
size_t count
uint16_t items[1]I still need those types to be declared. They can be dummy since the cython generated c code will include the correct headers. By removing the used types in IGNORE_DECLARATIONS, it almost works:
...
ctypedef int size_t
ctypedef _Bool bool
ctypedef int uint16_t
..._Bool needs to be replaced by bint, so I added filter for that in parse(). I noticed by accident that size_t is understood by Cython, but that is undocumented so probably best to typedef to int
...
ctypedef int size_t
ctypedef bint bool
ctypedef int uint16_t
...An alternative is to manually prepend the generated pxd with:
cdef extern:
ctypedef bint _BoolIt seems I am missing some step here. What is the intended usage for dealing with standard types?
Metadata
Metadata
Assignees
Labels
No labels