|
|
#ifndef Py_CPYTHON_BYTEARRAYOBJECT_H |
|
|
# error "this header file must not be included directly" |
|
|
#endif |
|
|
|
|
|
|
|
|
typedef struct { |
|
|
PyObject_VAR_HEAD |
|
|
Py_ssize_t ob_alloc; |
|
|
char *ob_bytes; |
|
|
char *ob_start; |
|
|
Py_ssize_t ob_exports; |
|
|
} PyByteArrayObject; |
|
|
|
|
|
|
|
|
#define PyByteArray_AS_STRING(self) \ |
|
|
(assert(PyByteArray_Check(self)), \ |
|
|
Py_SIZE(self) ? ((PyByteArrayObject *)(self))->ob_start : _PyByteArray_empty_string) |
|
|
#define PyByteArray_GET_SIZE(self) (assert(PyByteArray_Check(self)), Py_SIZE(self)) |
|
|
|
|
|
PyAPI_DATA(char) _PyByteArray_empty_string[]; |
|
|
|