3 #ifndef Py_BYTEARRAYOBJECT_H
4 #define Py_BYTEARRAYOBJECT_H
35 #define PyByteArray_Check(self) PyObject_TypeCheck(self, &PyByteArray_Type)
36 #define PyByteArray_CheckExact(self) (Py_TYPE(self) == &PyByteArray_Type)
40 PyAPI_FUNC(PyObject *) PyByteArray_Concat(PyObject *, PyObject *);
42 PyAPI_FUNC(Py_ssize_t) PyByteArray_Size(PyObject *);
43 PyAPI_FUNC(
char *) PyByteArray_AsString(PyObject *);
44 PyAPI_FUNC(
int) PyByteArray_Resize(PyObject *, Py_ssize_t);
47 #define PyByteArray_AS_STRING(self) \
48 (assert(PyByteArray_Check(self)), \
49 Py_SIZE(self) ? ((PyByteArrayObject *)(self))->ob_bytes : _PyByteArray_empty_string)
50 #define PyByteArray_GET_SIZE(self) (assert(PyByteArray_Check(self)),Py_SIZE(self))