summaryrefslogtreecommitdiffstats
path: root/Include/bytesobject.h
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2008-08-26 16:46:47 (GMT)
committerBenjamin Peterson <benjamin@python.org>2008-08-26 16:46:47 (GMT)
commitc15a07333e712e682036d9ecb7230d25ccb1a85f (patch)
tree52eee04b10bc95047d25c9dd6b82ec9e48efeb97 /Include/bytesobject.h
parenta786b026c9992cee195b7a550bab2c70c50f874f (diff)
downloadcpython-c15a07333e712e682036d9ecb7230d25ccb1a85f.zip
cpython-c15a07333e712e682036d9ecb7230d25ccb1a85f.tar.gz
cpython-c15a07333e712e682036d9ecb7230d25ccb1a85f.tar.bz2
make bytes(o) respect __bytes__ #2415
This adds two new C-API functions: PyObject_Bytes and PyBytes_FromObject. Reviewer: Barry
Diffstat (limited to 'Include/bytesobject.h')
-rw-r--r--Include/bytesobject.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/Include/bytesobject.h b/Include/bytesobject.h
index ece06d2..3f275a8 100644
--- a/Include/bytesobject.h
+++ b/Include/bytesobject.h
@@ -48,6 +48,7 @@ PyAPI_DATA(PyTypeObject) PyBytesIter_Type;
PyAPI_FUNC(PyObject *) PyBytes_FromStringAndSize(const char *, Py_ssize_t);
PyAPI_FUNC(PyObject *) PyBytes_FromString(const char *);
+PyAPI_FUNC(PyObject *) PyBytes_FromObject(PyObject *);
PyAPI_FUNC(PyObject *) PyBytes_FromFormatV(const char*, va_list)
Py_GCC_ATTRIBUTE((format(printf, 1, 0)));
PyAPI_FUNC(PyObject *) PyBytes_FromFormat(const char*, ...)