File indexing completed on 2025-11-19 09:50:40
0001 #ifndef Py_CPYTHON_BYTESOBJECT_H
0002 # error "this header file must not be included directly"
0003 #endif
0004
0005 typedef struct {
0006 PyObject_VAR_HEAD
0007 Py_DEPRECATED(3.11) Py_hash_t ob_shash;
0008 char ob_sval[1];
0009
0010
0011
0012
0013
0014
0015 } PyBytesObject;
0016
0017 PyAPI_FUNC(int) _PyBytes_Resize(PyObject **, Py_ssize_t);
0018
0019
0020 #define _PyBytes_CAST(op) \
0021 (assert(PyBytes_Check(op)), _Py_CAST(PyBytesObject*, op))
0022
0023 static inline char* PyBytes_AS_STRING(PyObject *op)
0024 {
0025 return _PyBytes_CAST(op)->ob_sval;
0026 }
0027 #define PyBytes_AS_STRING(op) PyBytes_AS_STRING(_PyObject_CAST(op))
0028
0029 static inline Py_ssize_t PyBytes_GET_SIZE(PyObject *op) {
0030 PyBytesObject *self = _PyBytes_CAST(op);
0031 return Py_SIZE(self);
0032 }
0033 #define PyBytes_GET_SIZE(self) PyBytes_GET_SIZE(_PyObject_CAST(self))
0034
0035
0036
0037 PyAPI_FUNC(PyObject*) _PyBytes_Join(PyObject *sep, PyObject *x);