diff options
author | Guido van Rossum <guido@python.org> | 1997-05-05 22:15:02 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1997-05-05 22:15:02 (GMT) |
commit | fdf95dd525840559d77637802ff117969db19031 (patch) | |
tree | ac06e548154ef068d134401a08f66c17d681628b /Include/object.h | |
parent | 8290e075096ac985c564b738a35307fac0992149 (diff) | |
download | cpython-fdf95dd525840559d77637802ff117969db19031.zip cpython-fdf95dd525840559d77637802ff117969db19031.tar.gz cpython-fdf95dd525840559d77637802ff117969db19031.tar.bz2 |
Checkin of Jack's buffer mods.
Not really checked, but didn't fail any tests either...
Diffstat (limited to 'Include/object.h')
-rw-r--r-- | Include/object.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/Include/object.h b/Include/object.h index 54b5481..45bb41e 100644 --- a/Include/object.h +++ b/Include/object.h @@ -146,6 +146,9 @@ typedef PyObject *(*intintargfunc) Py_PROTO((PyObject *, int, int)); typedef int(*intobjargproc) Py_PROTO((PyObject *, int, PyObject *)); typedef int(*intintobjargproc) Py_PROTO((PyObject *, int, int, PyObject *)); typedef int(*objobjargproc) Py_PROTO((PyObject *, PyObject *, PyObject *)); +typedef int (*getreadbufferproc) Py_PROTO((PyObject *, int, void **)); +typedef int (*getwritebufferproc) Py_PROTO((PyObject *, int, void **)); +typedef int (*getsegcountproc) Py_PROTO((PyObject *, int *)); typedef struct { binaryfunc nb_add; @@ -189,6 +192,13 @@ typedef struct { objobjargproc mp_ass_subscript; } PyMappingMethods; +typedef struct { + getreadbufferproc bf_getreadbuffer; + getwritebufferproc bf_getwritebuffer; + getsegcountproc bf_getsegcount; +} PyBufferProcs; + + typedef void (*destructor) Py_PROTO((PyObject *)); typedef int (*printfunc) Py_PROTO((PyObject *, FILE *, int)); typedef PyObject *(*getattrfunc) Py_PROTO((PyObject *, char *)); @@ -227,8 +237,10 @@ typedef struct _typeobject { getattrofunc tp_getattro; setattrofunc tp_setattro; + /* Functions to access object as input/output buffer */ + PyBufferProcs *tp_as_buffer; + /* Space for future expansion */ - long tp_xxx3; long tp_xxx4; char *tp_doc; /* Documentation string */ |