mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Checkin of Jack's buffer mods.
Not really checked, but didn't fail any tests either...
This commit is contained in:
parent
8290e07509
commit
fdf95dd525
5 changed files with 232 additions and 27 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue