robertwb / issues-import-test

0 stars 0 forks source link

embedsignatures=True breaks lamda functions at module level #983

Closed robertwb closed 10 years ago

robertwb commented 10 years ago
bug.pyx:
# cython: embedsignature=True

foo = lambda x: 10
bar = lambda x: 20

setup.py:
from distutils.core import setup
from Cython.Build import cythonize
import cython
print cython.__version__
setup(
    name = "foobar",
    ext_modules = cythonize('bug.pyx'),
)

$ python setup.py build_ext --inplace
0.20.2
running build_ext
building 'bug' extension
gcc ... -c bug.c -o build/temp.linux-x86_64-2.7/bug.o
bug.c:761:13: error: redefinition of 'None'
 static char None[= "<lambda>(x)";
             ^
bug.c:724:13: note: previous definition of 'None' was here
 static char None[](]) = "<lambda>(x)";
             ^
error: command 'gcc' failed with exit status 1

http://thread.gmane.org/gmane.comp.python.cython.user/11642

Migrated from http://trac.cython.org/ticket/830

robertwb commented 10 years ago

scoder changed milestone from wishlist to 0.21 owner from somebody to scoder status from new to assigned Fixed here:

https://github.com/cython/cython/commit/d4df9dd0aab7c0aeb34e5b691ca600dd9800a4de

robertwb commented 10 years ago

scoder changed resolution to fixed status from assigned to closed