Reported by jdemeyer on 12 Jun 2015 14:34 UTC
Consider the following files:
header.pxd:
ctypedef struct mytype:
int foo
cdef mytype broken
cytest.pyx:
# distutils: language = c++
from header cimport broken
from glob import *
Compiling this gives
build/cythonized/sage/misc/cytest.cpp: In function int __pyx_import_star_set(PyObject*, PyObject*, char*):
build/cythonized/sage/misc/cytest.cpp:651:105: error: __pyx_convert__from_py___pyx_t_4sage_4misc_6header_mytype was not declared in this scope
__pyx_v_4sage_4misc_6header_broken = __pyx_convert__from_py___pyx_t_4sage_4misc_6header_mytype(o); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[__pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L2_error;};
The reason is here in Cython/Compiler/ModuleNode.py:
Reported by jdemeyer on 12 Jun 2015 14:34 UTC Consider the following files:
header.pxd
:cytest.pyx
:Compiling this gives
The reason is here in
Cython/Compiler/ModuleNode.py
:The problem is that
from_py_function()
is called but the code for thisfrom_py_function()
is not generated.Migrated-From: http://trac.cython.org/ticket/851