Debian Codegraph @

pypy/module/cpyext/include/bytearrayobject.h

raw symbols SCIP
1 /* ByteArray object interface */
2
3 #ifndef Py_BYTEARRAYOBJECT_H
4 #define Py_BYTEARRAYOBJECT_H
5 #ifdef __cplusplus
6 extern "C" {
7 #endif
8
9 #include <stdarg.h>
10
11 /* Type PyByteArrayObject represents a mutable array of bytes.
12 * The Python API is that of a sequence;
13 * the bytes are mapped to ints in [0, 256).
14 * Bytes are not characters; they may be used to encode characters.
15 * The only way to go between bytes and str/unicode is via encoding
16 * and decoding.
17 * While CPython exposes interfaces to this object, pypy does not
18 */
19
20 #define PyByteArray_GET_SIZE(op) PyByteArray_Size((PyObject*)(op))
21 #define PyByteArray_AS_STRING(op) PyByteArray_AsString((PyObject*)(op))
22
23 /* Object layout */
24 typedef struct {
25 PyObject_VAR_HEAD
26 #if 0
27 int ob_exports; /* how many buffer exports */
28 Py_ssize_t ob_alloc; /* How many bytes allocated */
29 char *ob_bytes;
30 #endif
31 } PyByteArrayObject;
32
33 #ifdef __cplusplus
34 }
35 #endif
36 #endif /* !Py_BYTEARRAYOBJECT_H */