Declaring FILE pointers in Cython

2019-05-10 14:01发布

问题:

How do we declare file pointers in Cython? If I use the following:

cdef FILE* f

It shows the error "FILE is not a type identifier".

Please suggest any changes.

回答1:

from libc.stdio cimport FILE

Definitions here: https://github.com/cython/cython/blob/master/Cython/Includes/libc/stdio.pxd



标签: python cython