Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:06:48

0001 /* ByteArray object interface */
0002 
0003 #ifndef Py_BYTEARRAYOBJECT_H
0004 #define Py_BYTEARRAYOBJECT_H
0005 #ifdef __cplusplus
0006 extern "C" {
0007 #endif
0008 
0009 /* Type PyByteArrayObject represents a mutable array of bytes.
0010  * The Python API is that of a sequence;
0011  * the bytes are mapped to ints in [0, 256).
0012  * Bytes are not characters; they may be used to encode characters.
0013  * The only way to go between bytes and str/unicode is via encoding
0014  * and decoding.
0015  * For the convenience of C programmers, the bytes type is considered
0016  * to contain a char pointer, not an unsigned char pointer.
0017  */
0018 
0019 /* Type object */
0020 PyAPI_DATA(PyTypeObject) PyByteArray_Type;
0021 PyAPI_DATA(PyTypeObject) PyByteArrayIter_Type;
0022 
0023 /* Type check macros */
0024 #define PyByteArray_Check(self) PyObject_TypeCheck((self), &PyByteArray_Type)
0025 #define PyByteArray_CheckExact(self) Py_IS_TYPE((self), &PyByteArray_Type)
0026 
0027 /* Direct API functions */
0028 PyAPI_FUNC(PyObject *) PyByteArray_FromObject(PyObject *);
0029 PyAPI_FUNC(PyObject *) PyByteArray_Concat(PyObject *, PyObject *);
0030 PyAPI_FUNC(PyObject *) PyByteArray_FromStringAndSize(const char *, Py_ssize_t);
0031 PyAPI_FUNC(Py_ssize_t) PyByteArray_Size(PyObject *);
0032 PyAPI_FUNC(char *) PyByteArray_AsString(PyObject *);
0033 PyAPI_FUNC(int) PyByteArray_Resize(PyObject *, Py_ssize_t);
0034 
0035 #ifndef Py_LIMITED_API
0036 #  define Py_CPYTHON_BYTEARRAYOBJECT_H
0037 #  include "cpython/bytearrayobject.h"
0038 #  undef Py_CPYTHON_BYTEARRAYOBJECT_H
0039 #endif
0040 
0041 #ifdef __cplusplus
0042 }
0043 #endif
0044 #endif /* !Py_BYTEARRAYOBJECT_H */