mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Rough and dirty job -- allow concatenation of bytes and arbitrary
buffer-supporting objects (Unicode always excluded), and also of str and bytes. (For some reason u"" + b"" doesn't fail, I'll investigate later.)
This commit is contained in:
parent
dc0b1a1069
commit
ad7d8d10b7
5 changed files with 213 additions and 73 deletions
|
@ -34,6 +34,7 @@ PyAPI_DATA(PyTypeObject) PyBytes_Type;
|
|||
|
||||
/* Direct API functions */
|
||||
PyAPI_FUNC(PyObject *) PyBytes_FromObject(PyObject *);
|
||||
PyAPI_FUNC(PyObject *) PyBytes_Concat(PyObject *, PyObject *);
|
||||
PyAPI_FUNC(PyObject *) PyBytes_FromStringAndSize(const char *, Py_ssize_t);
|
||||
PyAPI_FUNC(Py_ssize_t) PyBytes_Size(PyObject *);
|
||||
PyAPI_FUNC(char *) PyBytes_AsString(PyObject *);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue