Liking cljdoc? Tell your friends :D

libpython-clj.jna.concrete.bytes


PyBytes_AsStringclj

(PyBytes_AsString o)

Return a pointer to the contents of o. The pointer refers to the internal buffer of o, which consists of len(o) + 1 bytes. The last byte in the buffer is always null, regardless of whether there are any other null bytes. The data must not be modified in any way, unless the object was just created using PyBytes_FromStringAndSize(NULL, size). It must not be deallocated. If o is not a bytes object at all, PyBytes_AsString() returns NULL and raises TypeError.

Return a pointer to the contents of o. The pointer refers to the internal buffer of
o, which consists of len(o) + 1 bytes. The last byte in the buffer is always null,
regardless of whether there are any other null bytes. The data must not be modified in
any way, unless the object was just created using PyBytes_FromStringAndSize(NULL,
size). It must not be deallocated. If o is not a bytes object at all,
PyBytes_AsString() returns NULL and raises TypeError.
sourceraw docstring

PyBytes_AsStringAndSizeclj

(PyBytes_AsStringAndSize obj ptr-to-buffer length)

Return the null-terminated contents of the object obj through the output variables buffer and length.

If length is NULL, the bytes object may not contain embedded null bytes; if it does, the function returns -1 and a ValueError is raised.

The buffer refers to an internal buffer of obj, which includes an additional null byte at the end (not counted in length). The data must not be modified in any way, unless the object was just created using PyBytes_FromStringAndSize(NULL, size). It must not be deallocated. If obj is not a bytes object at all, PyBytes_AsStringAndSize() returns -1 and raises TypeError.

Changed in version 3.5: Previously, TypeError was raised when embedded null bytes were encountered in the bytes object.

Signature: int (PyObject *obj, char **buffer, Py_ssize_t *length)

Return the null-terminated contents of the object obj through the output variables
buffer and length.

 If length is NULL, the bytes object may not contain embedded null bytes; if it does,
 the function returns -1 and a ValueError is raised.

 The buffer refers to an internal buffer of obj, which includes an additional null
 byte at the end (not counted in length). The data must not be modified in any way,
 unless the object was just created using PyBytes_FromStringAndSize(NULL, size). It
 must not be deallocated. If obj is not a bytes object at all,
 PyBytes_AsStringAndSize() returns -1 and raises TypeError.

 Changed in version 3.5: Previously, TypeError was raised when embedded null bytes
 were encountered in the bytes object.

 Signature:
 int (PyObject *obj, char **buffer, Py_ssize_t *length)
sourceraw docstring

PyBytes_Checkclj

(PyBytes_Check o)

Return true if the object o is a bytes object or an instance of a subtype of the bytes type.

Return true if the object o is a bytes object or an instance of a subtype of the
bytes type.
sourceraw docstring

PyBytes_CheckExactclj

(PyBytes_CheckExact o)

Return true if the object o is a bytes object, but not an instance of a subtype of the bytes type.

Return true if the object o is a bytes object, but not an instance of a subtype of
the bytes type.
sourceraw docstring

PyBytes_Concatclj

(PyBytes_Concat out-bytes newpart)

Create a new bytes object in *bytes containing the contents of newpart appended to bytes; the caller will own the new reference. The reference to the old value of bytes will be stolen. If the new object cannot be created, the old reference to bytes will still be discarded and the value of *bytes will be set to NULL; the appropriate exception will be set. Signature: void (PyObject **bytes, PyObject *newpart)

Create a new bytes object in *bytes containing the contents of newpart appended to
bytes; the caller will own the new reference. The reference to the old value of bytes
will be stolen. If the new object cannot be created, the old reference to bytes will
still be discarded and the value of *bytes will be set to NULL; the appropriate
exception will be set.
Signature:
void (PyObject **bytes, PyObject *newpart)
sourceraw docstring

PyBytes_ConcatAndDelclj

(PyBytes_ConcatAndDel out-bytes newpart)

Create a new bytes object in *bytes containing the contents of newpart appended to bytes. This version decrements the reference count of newpart. Signature: void (PyObject **bytes, PyObject *newpart)

Create a new bytes object in *bytes containing the contents of newpart appended to
bytes. This version decrements the reference count of newpart.
Signature:
void (PyObject **bytes, PyObject *newpart)
sourceraw docstring

PyBytes_FromStringclj

(PyBytes_FromString v)

Return value: New reference.

Return a new bytes object with a copy of the string v as value on success, and NULL on failure. The parameter v must not be NULL; it will not be checked.

Return value: New reference.

Return a new bytes object with a copy of the string v as value on success, and NULL
on failure. The parameter v must not be NULL; it will not be checked.
sourceraw docstring

PyBytes_FromStringAndSizeclj

(PyBytes_FromStringAndSize v len)

Return value: New reference.

Return a new bytes object with a copy of the string v as value and length len on success, and NULL on failure. If v is NULL, the contents of the bytes object are uninitialized.

Return value: New reference.

Return a new bytes object with a copy of the string v as value and length len on
success, and NULL on failure. If v is NULL, the contents of the bytes object are
uninitialized.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close