Dear Cython folks,Upgrading to 0.11.2 from 0.11.1 breaks the following code (using Python 2.6.2 under OS X.5):
-----------------------------------------
cdef extern from "ntest-def.h":
ctypedef char Boolean
cdef public Boolean gLongComputationInProgress
------------------------------------------
with resulting error:
----------------------------------------
cythoning ntest.pyx to ntest.c
Error converting Pyrex file to C:
------------------------------------------------------------
...
cdef extern from "ntest-def.h":
ctypedef char Boolean
cdef public Boolean gLongComputationInProgress
^
------------------------------------------------------------
/Users/dunfield/work/SnapPy/ntest/ntest.pyx:4:20: Compiler crash in
AnalyseDeclarationsTransform
ModuleNode.body = StatListNode(ntest.pyx:1:0) StatListNode.stats[1] = CVarDefNode(ntest.pyx:4:5, need_properties = [...]/1, visibility = u'public')File 'Nodes.py', line 2778, in analyse_declarations: PropertyNode(ntest.pyx:4:20,
name = u'gLongComputationInProgress') Compiler crash traceback from this point on:File "/Library/Frameworks/Python.framework/Versions/2.6/lib/ python2.6/site-packages/Cython-0.11.2-py2.6-macosx-10.3-fat.egg/Cython/ Compiler/Nodes.py", line 2779, in analyse_declarations
entry = env.declare_property(self.name, self.doc, self.pos) AttributeError: 'ModuleScope' object has no attribute 'declare_property' building 'ntest' extension ------------------------------------------------------------- Replacing the initial code with -------------------------------------------------- ctypedef char Boolean cdef public Boolean gLongComputationInProgress -------------------------------------------------- fixes the problem, though I'm not sure why.While I have not filed a bug report on this, though I'm happy to do so if requested. I've attached a minimal example exhibiting the bug that conversely works fine with Cython 0.11.1.
Best,
Nathan
ntest.tgz
Description: Binary data
_______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
