diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2015-10-09 12:57:22 +0200 |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2015-10-09 12:57:22 +0200 |
commit | ce179bf6baed91ba84cc3ff647e96287c3b8e2f2 (patch) | |
tree | 47ccc59059e1b2565784bbaf8c9c778a39628cfa /Include/bytesobject.h | |
parent | ad7715891e3c6c51b4860e0d496843ee5417206b (diff) | |
download | cpython-git-ce179bf6baed91ba84cc3ff647e96287c3b8e2f2.tar.gz |
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 6cd5a340a5..2c4c4c4fd4 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 |