17
I'd like to create my very own list container using Cython. I'm a very new begginer to it, and following the documentation I could get to creating such a structure :
cdef struct s_intList:
int value
void* next
ctypedef s_intList intList
but when comes the time to acces the struct members, I can't find the good syntax:
cpdef void foo():
cdef intList* li
# li.value OR li->value
throws : "warning: intlists.pyx:8:12: local variable 'li' referenced before assignment" which let me assume that my cython structs usage is incorrect...
Any idea of what I'm doing wrong here please? :) Thank you for you help