This is a bug in Cython which we must fix. As a temporary solution you can replace "char[]" with "char*" in that pxd file.
Dag Sverre Seljebotn -----Original Message----- From: "Case Vanhorsen" <[email protected]> Date: Monday, Jan 19, 2009 8:23 am Subject: [Cython] error with cimport python_version To: [email protected]: [email protected] I'm probably doing something wrong, but I'm getting an error when I >try to compile the following: > >cimport python_version > > >print hex(python_version.PY_VERSION_HEX) > > >The error message is: > >using Cython >running build_ext >cythoning test.pyx to test.c > >Error converting Pyrex file to C: >------------------------------------------------------------ >... > # 0xA (alpha) > # 0xB (beta) > # 0xC (release candidate) > # 0xF (final) > > char[] PY_VERSION > ^ >------------------------------------------------------------ > >/usr/local/lib/python2.6/site-packages/Cython/Includes/python_version.pxd:31:8: > Buffer types only allowed as function local variables > >Error converting Pyrex file to C: >------------------------------------------------------------ >... > # 0xB (beta) > # 0xC (release candidate) > # 0xF (final) > > char[] PY_VERSION > char[] PY_PATCHLEVEL_REVISION > ^ >------------------------------------------------------------ > >/usr/local/lib/python2.6/site-packages/Cython/Includes/python_version.pxd:32:8: > Buffer types only allowed as function local variables > >If I comment out the last two lines of python_version, it does compile >properly and I get the correct hex value. I tried both 0.10.3 and >cython-devel. > >Suggestions? > >Case >_______________________________________________ >Cython-dev mailing list >[email protected] >http://codespeak.net/mailman/listinfo/cython-dev > _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
