I'm trying to use a C struct in Cython, that defines a linked list:
typedef struct {
struct query_result* next_result;
char* result;
} query_result;
As you can see I'm using the query_result type inside its own definition. Using this as is, in Cython gives me compiler errors:
cdef extern from 'c_wrapper.h':
struct query_result:
struct query_result*
char*
Any ideas about how to properly handle this recursive definition in Cython?
You shouldn't use the
struct
keyword when you are referring to the type: