1 #include "common.h" 2 3 #define FileWrapper_CheckExact(x) ((x)->ob_type == &FileWrapper_Type) 4 5 PyTypeObject FileWrapper_Type; 6 7 typedef struct { 8 PyObject_HEAD 9 PyObject* file; 10 PyObject *blocksize; 11 int fd; 12 } FileWrapper; 13 14 void _init_filewrapper(void); 15 int FileWrapper_GetFd(PyObject *self); 16 void FileWrapper_Done(PyObject *self); 17