Discussion:
[Cython] wrong c file
Shang Yu
2014-10-19 14:10:08 UTC
Permalink
Hi dear all,
I'm trying cyhotn(0.21) with following code (hello.pyx)

cdef void cfun():
print "hello world"

if __name__ == "__main__":
cfun()

the generated c file has following line

static void "__hello" __pyx_f_5hello_cfun(void) {

which can't compiled by c compiler , what's wrong with this ?
Many thanks !!!
Shang Yu
2014-10-19 22:54:40 UTC
Permalink
Sorry . I've found it's because of the following line

#cython:callspec="__hello",language_level=2



---------- Forwarded message ----------
From: Shang Yu <yusunn-***@public.gmane.org>
Date: 2014-10-19 22:10 GMT+08:00
Subject: wrong c file
To: cython-devel-+ZN9ApsXKcEdnm+***@public.gmane.org


Hi dear all,
I'm trying cyhotn(0.21) with following code (hello.pyx)

cdef void cfun():
print "hello world"

if __name__ == "__main__":
cfun()

the generated c file has following line

static void "__hello" __pyx_f_5hello_cfun(void) {

which can't compiled by c compiler , what's wrong with this ?
Many thanks !!!

Loading...