[Cython] Strange cimport behaviour
Vitja Makarov
vitja.makarov at gmail.com
Fri Jul 15 21:36:39 CEST 2011
15 июля 2011 г. 23:32 пользователь Vitja Makarov
<vitja.makarov at gmail.com> написал:
> Hi!
>
> I've found strange bug. In my example cimport misses "fcntl.h" include:
>
> ((c2f2e12...)) vitja at vitja-laptop:~/work/cython-vitek/zzz$ cat ./fff.pyx
> cimport posix.unistd
> cimport posix.fcntl
>
> print posix.fcntl.O_RDWR
>
> ((c2f2e12...)) vitja at vitja-laptop:~/work/cython-vitek/zzz$ make fff.so
> /usr//bin/python ../cython.py --gdb -v fff.pyx -o fff.c
> Compiling /home/vitja/work/cython-vitek/zzz/fff.pyx
> gcc -O0 -g3 -fPIC -I/usr//include/python2.6 -g3 -W -c -o fff.o fff.c
> fff.c: In function 'initfff':
> fff.c:537: error: 'O_RDWR' undeclared (first use in this function)
> fff.c:537: error: (Each undeclared identifier is reported only once
> fff.c:537: error: for each function it appears in.)
> make: *** [fff.o] Ошибка 1
>
>
Btw, from posix cimport unistd, fcntl works as expected
--
vitja.
More information about the cython-devel
mailing list