py.pxd
changeset 6 10bd48c9b6ce
parent 5 59bed837c265
--- a/py.pxd	Sun Aug 16 16:38:44 2009 +0300
+++ b/py.pxd	Sun Aug 16 18:29:55 2009 +0300
@@ -1,12 +1,18 @@
+cimport libc
+
 cdef extern from "Python.h" :
     struct PyObject :
         pass
 
-    PyObject* PyErr_SetFromErrno (PyObject *type)
+    ## string stuff
+    int PyObject_AsCharBuffer (object obj, char **buf, libc.ssize_t *len) except -1
     
-    ## built-in exceptions
-    PyObject* PyExc_OSError
+    ## except setting
+    PyObject* PyErr_SetFromErrno (PyObject *type)
 
+    PyObject *PyExc_OSError
+    
 # raise OSError with errno
-cdef int raise_errno () except -1
+# XXX: doesn't do anything with func
+cdef int raise_errno (char *func) except -1