Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
cython
Commits
991fa23e
Commit
991fa23e
authored
Aug 22, 2018
by
Charles L. Yost
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add export of the bytearray cpython api
parent
62ed5b2c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
0 deletions
+33
-0
Cython/Includes/cpython/bytearray.pxd
Cython/Includes/cpython/bytearray.pxd
+33
-0
No files found.
Cython/Includes/cpython/bytearray.pxd
0 → 100644
View file @
991fa23e
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().
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment