home *** CD-ROM | disk | FTP | other *** search
/ PC World 2001 April / PCWorld_2001-04_cd.bin / Software / TemaCD / webclean / !!!python!!! / BeOpen-Python-2.0.exe / BUFFEROBJECT.H < prev    next >
Encoding:
C/C++ Source or Header  |  2000-09-01  |  962 b   |  34 lines

  1.  
  2. /* Buffer object interface */
  3.  
  4. /* Note: the object's structure is private */
  5.  
  6. #ifndef Py_BUFFEROBJECT_H
  7. #define Py_BUFFEROBJECT_H
  8. #ifdef __cplusplus
  9. extern "C" {
  10. #endif
  11.  
  12.  
  13. extern DL_IMPORT(PyTypeObject) PyBuffer_Type;
  14.  
  15. #define PyBuffer_Check(op) ((op)->ob_type == &PyBuffer_Type)
  16.  
  17. #define Py_END_OF_BUFFER    (-1)
  18.  
  19. extern DL_IMPORT(PyObject *) PyBuffer_FromObject(PyObject *base,
  20.                                                  int offset, int size);
  21. extern DL_IMPORT(PyObject *) PyBuffer_FromReadWriteObject(PyObject *base,
  22.                                                           int offset,
  23.                                                           int size);
  24.  
  25. extern DL_IMPORT(PyObject *) PyBuffer_FromMemory(void *ptr, int size);
  26. extern DL_IMPORT(PyObject *) PyBuffer_FromReadWriteMemory(void *ptr, int size);
  27.  
  28. extern DL_IMPORT(PyObject *) PyBuffer_New(int size);
  29.  
  30. #ifdef __cplusplus
  31. }
  32. #endif
  33. #endif /* !Py_BUFFEROBJECT_H */
  34.