qmsk/net/py.pxd
changeset 7 74fde84264b1
child 11 7ae92c2b433f
equal deleted inserted replaced
6:10bd48c9b6ce 7:74fde84264b1
       
     1 cimport libc
       
     2 
       
     3 cdef extern from "Python.h" :
       
     4     struct PyObject :
       
     5         pass
       
     6 
       
     7     ## string stuff
       
     8     int PyObject_AsCharBuffer (object obj, char **buf, libc.ssize_t *len) except -1
       
     9     
       
    10     ## except setting
       
    11     PyObject* PyErr_SetFromErrno (PyObject *type)
       
    12 
       
    13     PyObject *PyExc_OSError
       
    14     
       
    15 # raise OSError with errno
       
    16 # XXX: doesn't do anything with func
       
    17 cdef int raise_errno (char *func) except -1
       
    18