+++ /dev/null
-/* ByteArray object interface */\r
-\r
-#ifndef Py_BYTEARRAYOBJECT_H\r
-#define Py_BYTEARRAYOBJECT_H\r
-#ifdef __cplusplus\r
-extern "C" {\r
-#endif\r
-\r
-#include <stdarg.h>\r
-\r
-/* Type PyByteArrayObject represents a mutable array of bytes.\r
- * The Python API is that of a sequence;\r
- * the bytes are mapped to ints in [0, 256).\r
- * Bytes are not characters; they may be used to encode characters.\r
- * The only way to go between bytes and str/unicode is via encoding\r
- * and decoding.\r
- * For the convenience of C programmers, the bytes type is considered\r
- * to contain a char pointer, not an unsigned char pointer.\r
- */\r
-\r
-/* Object layout */\r
-typedef struct {\r
- PyObject_VAR_HEAD\r
- /* XXX(nnorwitz): should ob_exports be Py_ssize_t? */\r
- int ob_exports; /* how many buffer exports */\r
- Py_ssize_t ob_alloc; /* How many bytes allocated */\r
- char *ob_bytes;\r
-} PyByteArrayObject;\r
-\r
-/* Type object */\r
-PyAPI_DATA(PyTypeObject) PyByteArray_Type;\r
-PyAPI_DATA(PyTypeObject) PyByteArrayIter_Type;\r
-\r
-/* Type check macros */\r
-#define PyByteArray_Check(self) PyObject_TypeCheck(self, &PyByteArray_Type)\r
-#define PyByteArray_CheckExact(self) (Py_TYPE(self) == &PyByteArray_Type)\r
-\r
-/* Direct API functions */\r
-PyAPI_FUNC(PyObject *) PyByteArray_FromObject(PyObject *);\r
-PyAPI_FUNC(PyObject *) PyByteArray_Concat(PyObject *, PyObject *);\r
-PyAPI_FUNC(PyObject *) PyByteArray_FromStringAndSize(const char *, Py_ssize_t);\r
-PyAPI_FUNC(Py_ssize_t) PyByteArray_Size(PyObject *);\r
-PyAPI_FUNC(char *) PyByteArray_AsString(PyObject *);\r
-PyAPI_FUNC(int) PyByteArray_Resize(PyObject *, Py_ssize_t);\r
-\r
-/* Macros, trading safety for speed */\r
-#define PyByteArray_AS_STRING(self) \\r
- (assert(PyByteArray_Check(self)), \\r
- Py_SIZE(self) ? ((PyByteArrayObject *)(self))->ob_bytes : _PyByteArray_empty_string)\r
-#define PyByteArray_GET_SIZE(self) (assert(PyByteArray_Check(self)),Py_SIZE(self))\r
-\r
-PyAPI_DATA(char) _PyByteArray_empty_string[];\r
-\r
-#ifdef __cplusplus\r
-}\r
-#endif\r
-#endif /* !Py_BYTEARRAYOBJECT_H */\r