diff options
author | alexv-smirnov <alex@ydb.tech> | 2023-06-13 11:05:01 +0300 |
---|---|---|
committer | alexv-smirnov <alex@ydb.tech> | 2023-06-13 11:05:01 +0300 |
commit | bf0f13dd39ee3e65092ba3572bb5b1fcd125dcd0 (patch) | |
tree | 1d1df72c0541a59a81439842f46d95396d3e7189 /contrib/tools/cython/Cython/Includes/cpython/bytearray.pxd | |
parent | 8bfdfa9a9bd19bddbc58d888e180fbd1218681be (diff) | |
download | ydb-bf0f13dd39ee3e65092ba3572bb5b1fcd125dcd0.tar.gz |
add ymake export to ydb
Diffstat (limited to 'contrib/tools/cython/Cython/Includes/cpython/bytearray.pxd')
-rw-r--r-- | contrib/tools/cython/Cython/Includes/cpython/bytearray.pxd | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/contrib/tools/cython/Cython/Includes/cpython/bytearray.pxd b/contrib/tools/cython/Cython/Includes/cpython/bytearray.pxd new file mode 100644 index 0000000000..1af4a6c427 --- /dev/null +++ b/contrib/tools/cython/Cython/Includes/cpython/bytearray.pxd @@ -0,0 +1,33 @@ +from .object cimport PyObject + +cdef extern from "Python.h": + bint PyByteArray_Check(object o) + # Return true if the object o is a bytearray object or an instance of a subtype of the bytearray type. + + bint PyByteArray_CheckExact(object o) + # Return true if the object o is a bytearray object, but not an instance of a subtype of the bytearray type. + + bytearray PyByteArray_FromObject(object o) + # Return a new bytearray object from any object, o, that implements the buffer protocol. + + bytearray PyByteArray_FromStringAndSize(char *string, Py_ssize_t len) + # Create a new bytearray object from string and its length, len. On failure, NULL is returned. + + bytearray PyByteArray_Concat(object a, object b) + # Concat bytearrays a and b and return a new bytearray with the result. + + Py_ssize_t PyByteArray_Size(object bytearray) + # Return the size of bytearray after checking for a NULL pointer. + + char* PyByteArray_AsString(object bytearray) + # Return the contents of bytearray as a char array after checking for a NULL pointer. + # The returned array always has an extra null byte appended. + + int PyByteArray_Resize(object bytearray, Py_ssize_t len) + # Resize the internal buffer of bytearray to len. + + char* PyByteArray_AS_STRING(object bytearray) + # Macro version of PyByteArray_AsString(). + + Py_ssize_t PyByteArray_GET_SIZE(object bytearray) + # Macro version of PyByteArray_Size(). |