author | Tero Marttila <terom@fixme.fi> |
Sun, 16 Aug 2009 18:29:55 +0300 | |
changeset 6 | 10bd48c9b6ce |
parent 5 | 59bed837c265 |
permissions | -rw-r--r-- |
cimport libc cdef extern from "Python.h" : struct PyObject : pass ## string stuff int PyObject_AsCharBuffer (object obj, char **buf, libc.ssize_t *len) except -1 ## except setting PyObject* PyErr_SetFromErrno (PyObject *type) PyObject *PyExc_OSError # raise OSError with errno # XXX: doesn't do anything with func cdef int raise_errno (char *func) except -1