diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2015-10-09 10:57:22 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2015-10-09 10:57:22 (GMT) |
commit | ce179bf6baed91ba84cc3ff647e96287c3b8e2f2 (patch) | |
tree | 47ccc59059e1b2565784bbaf8c9c778a39628cfa /Include/bytesobject.h | |
parent | ad7715891e3c6c51b4860e0d496843ee5417206b (diff) | |
download | cpython-ce179bf6baed91ba84cc3ff647e96287c3b8e2f2.zip cpython-ce179bf6baed91ba84cc3ff647e96287c3b8e2f2.tar.gz cpython-ce179bf6baed91ba84cc3ff647e96287c3b8e2f2.tar.bz2 |
Add _PyBytesWriter_WriteBytes() to factorize the code
Diffstat (limited to 'Include/bytesobject.h')
-rw-r--r-- | Include/bytesobject.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Include/bytesobject.h b/Include/bytesobject.h index 6cd5a34..2c4c4c4 100644 --- a/Include/bytesobject.h +++ b/Include/bytesobject.h @@ -174,6 +174,13 @@ PyAPI_FUNC(char*) _PyBytesWriter_Alloc(_PyBytesWriter *writer, PyAPI_FUNC(char*) _PyBytesWriter_Prepare(_PyBytesWriter *writer, char *str, Py_ssize_t size); + +/* Write bytes. + Raise an exception and return NULL on error. */ +PyAPI_FUNC(char*) _PyBytesWriter_WriteBytes(_PyBytesWriter *writer, + char *str, + char *bytes, + Py_ssize_t size); #endif /* Py_LIMITED_API */ #ifdef __cplusplus |