Guido van Rossum | 2e19bd7 | 1998-10-07 14:36:10 +0000 | [diff] [blame] | 1 | #ifndef Py_BUFFEROBJECT_H |
| 2 | #define Py_BUFFEROBJECT_H |
| 3 | #ifdef __cplusplus |
| 4 | extern "C" { |
| 5 | #endif |
| 6 | |
| 7 | /*********************************************************** |
| 8 | Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, |
| 9 | The Netherlands. |
| 10 | |
| 11 | All Rights Reserved |
| 12 | |
Guido van Rossum | fd71b9e | 2000-06-30 23:50:40 +0000 | [diff] [blame^] | 13 | Copyright (c) 2000, BeOpen.com. |
| 14 | Copyright (c) 1995-2000, Corporation for National Research Initiatives. |
| 15 | Copyright (c) 1990-1995, Stichting Mathematisch Centrum. |
| 16 | All rights reserved. |
Guido van Rossum | 2e19bd7 | 1998-10-07 14:36:10 +0000 | [diff] [blame] | 17 | |
Guido van Rossum | fd71b9e | 2000-06-30 23:50:40 +0000 | [diff] [blame^] | 18 | See the file "Misc/COPYRIGHT" for information on usage and |
| 19 | redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. |
Guido van Rossum | 2e19bd7 | 1998-10-07 14:36:10 +0000 | [diff] [blame] | 20 | |
| 21 | ******************************************************************/ |
| 22 | |
| 23 | /* Buffer object interface */ |
| 24 | |
| 25 | /* Note: the object's structure is private */ |
| 26 | |
| 27 | |
| 28 | extern DL_IMPORT(PyTypeObject) PyBuffer_Type; |
| 29 | |
| 30 | #define PyBuffer_Check(op) ((op)->ob_type == &PyBuffer_Type) |
| 31 | |
| 32 | #define Py_END_OF_BUFFER (-1) |
| 33 | |
Guido van Rossum | 43466ec | 1998-12-04 18:48:25 +0000 | [diff] [blame] | 34 | extern DL_IMPORT(PyObject *) PyBuffer_FromObject Py_PROTO((PyObject *base, int offset, int size)); |
| 35 | extern DL_IMPORT(PyObject *) PyBuffer_FromReadWriteObject Py_PROTO((PyObject *base, int offset, int size)); |
Guido van Rossum | 2e19bd7 | 1998-10-07 14:36:10 +0000 | [diff] [blame] | 36 | |
Guido van Rossum | 43466ec | 1998-12-04 18:48:25 +0000 | [diff] [blame] | 37 | extern DL_IMPORT(PyObject *) PyBuffer_FromMemory Py_PROTO((void *ptr, int size)); |
| 38 | extern DL_IMPORT(PyObject *) PyBuffer_FromReadWriteMemory Py_PROTO((void *ptr, int size)); |
Guido van Rossum | 2e19bd7 | 1998-10-07 14:36:10 +0000 | [diff] [blame] | 39 | |
Guido van Rossum | 43466ec | 1998-12-04 18:48:25 +0000 | [diff] [blame] | 40 | extern DL_IMPORT(PyObject *) PyBuffer_New Py_PROTO((int size)); |
Guido van Rossum | 2e19bd7 | 1998-10-07 14:36:10 +0000 | [diff] [blame] | 41 | |
| 42 | #ifdef __cplusplus |
| 43 | } |
| 44 | #endif |
| 45 | #endif /* !Py_BUFFEROBJECT_H */ |
| 46 | |