这是我的 cython 程序
cdef struct Node:
int v
Node* next
Node* pre
def f(int N):
cdef:
vector[Node*] narray
int i
narray.assign(N, 0)
for i in xrange(N):
narray[i] = 0
Cython 编译结果:
Error compiling Cython file:
------------------------------------------------------------
...
cdef:
vector[Node*] narray
int i
narray.assign(N, 0)
for i in xrange(N):
narray[i] = 0
^
------------------------------------------------------------
testLinkList.pyx:107:14: Compiler crash in AnalyseExpressionsTransform
但我可以使用push_back()
在向量末尾附加值或使用int
而不是Node*
. 怎么了?