@@ -38,6 +38,7 @@ Py_LOCAL_INLINE(Py_ssize_t) _PyBytesWriter_GetSize(_PyBytesWriter *writer,
3838 char * str );
3939static void * _PyBytesWriter_ResizeAndUpdatePointer (PyBytesWriter * writer ,
4040 Py_ssize_t size , void * data );
41+ static Py_ssize_t _PyBytesWriter_GetAllocated (PyBytesWriter * writer );
4142
4243
4344#define CHARACTERS _Py_SINGLETON(bytes_characters)
@@ -2859,7 +2860,7 @@ _PyBytes_FromList(PyObject *x)
28592860 return NULL ;
28602861 }
28612862 char * str = PyBytesWriter_GetData (writer );
2862- size = PyBytesWriter_GetAllocated (writer );
2863+ size = _PyBytesWriter_GetAllocated (writer );
28632864
28642865 for (Py_ssize_t i = 0 ; i < PyList_GET_SIZE (x ); i ++ ) {
28652866 PyObject * item = PyList_GET_ITEM (x , i );
@@ -2880,7 +2881,7 @@ _PyBytes_FromList(PyObject *x)
28802881 if (str == NULL ) {
28812882 goto error ;
28822883 }
2883- size = PyBytesWriter_GetAllocated (writer );
2884+ size = _PyBytesWriter_GetAllocated (writer );
28842885 }
28852886 * str ++ = (char ) value ;
28862887 }
@@ -2940,7 +2941,7 @@ _PyBytes_FromIterator(PyObject *it, PyObject *x)
29402941 return NULL ;
29412942 }
29422943 char * str = PyBytesWriter_GetData (writer );
2943- size = PyBytesWriter_GetAllocated (writer );
2944+ size = _PyBytesWriter_GetAllocated (writer );
29442945
29452946 /* Run the iterator to exhaustion */
29462947 for (i = 0 ; ; i ++ ) {
@@ -2974,7 +2975,7 @@ _PyBytes_FromIterator(PyObject *it, PyObject *x)
29742975 if (str == NULL ) {
29752976 goto error ;
29762977 }
2977- size = PyBytesWriter_GetAllocated (writer );
2978+ size = _PyBytesWriter_GetAllocated (writer );
29782979 }
29792980 * str ++ = (char ) value ;
29802981 }
@@ -3946,8 +3947,8 @@ PyBytesWriter_GetSize(PyBytesWriter *writer)
39463947}
39473948
39483949
3949- Py_ssize_t
3950- PyBytesWriter_GetAllocated (PyBytesWriter * writer )
3950+ static Py_ssize_t
3951+ _PyBytesWriter_GetAllocated (PyBytesWriter * writer )
39513952{
39523953 return byteswriter_allocated (writer );
39533954}
0 commit comments