@@@ py_buffer/freebin wip
[catacomb-python] / pyke / pyke.h
index a60fd76..4390c95 100644 (file)
@@ -355,12 +355,15 @@ extern void restore_exception(struct excinfo *, const char *, ...);
 /* Input conversion functions for standard kinds of objects, with overflow
  * checking where applicable.
  */
-struct bin { const void *p; Py_ssize_t sz; };
+struct bin { Py_buffer vw; const void *p; Py_ssize_t sz; };
+#define BIN_INIT { { 0 } 0, 0 }
+
 extern int convulong(PyObject *, void *); /* unsigned long */
 extern int convuint(PyObject *, void *); /* unsigned int */
 extern int convszt(PyObject *, void *);        /* size_t */
 extern int convbool(PyObject *, void *); /* bool */
 extern int convbin(PyObject *, void *); /* read buffer holding bytes */
+extern void freebin(struct bin *);
 
 /* Output conversions. */
 extern PyObject *getbool(int);         /* bool */