55/* the more complicated methods. parts of these should be pulled out into the
66 shared code in bytes_methods.c to cut down on duplicate code bloat. */
77
8- Py_LOCAL_INLINE ( PyObject * )
8+ static inline PyObject *
99return_self (PyObject * self )
1010{
1111#if !STRINGLIB_MUTABLE
@@ -90,7 +90,7 @@ stringlib_expandtabs(PyObject *self, PyObject *args, PyObject *kwds)
9090 return NULL ;
9191}
9292
93- Py_LOCAL_INLINE ( PyObject * )
93+ static inline PyObject *
9494pad (PyObject * self , Py_ssize_t left , Py_ssize_t right , char fill )
9595{
9696 PyObject * u ;
@@ -212,7 +212,7 @@ stringlib_zfill(PyObject *self, PyObject *args)
212212 ((char *)memchr((const void *)(target), c, target_len))
213213
214214
215- Py_LOCAL_INLINE ( Py_ssize_t )
215+ static Py_ssize_t
216216countchar (const char * target , Py_ssize_t target_len , char c ,
217217 Py_ssize_t maxcount )
218218{
@@ -233,7 +233,7 @@ countchar(const char *target, Py_ssize_t target_len, char c,
233233/* Algorithms for different cases of string replacement */
234234
235235/* len(self)>=1, from="", len(to)>=1, maxcount>=1 */
236- Py_LOCAL ( PyObject * )
236+ static PyObject *
237237stringlib_replace_interleave (PyObject * self ,
238238 const char * to_s , Py_ssize_t to_len ,
239239 Py_ssize_t maxcount )
@@ -304,7 +304,7 @@ stringlib_replace_interleave(PyObject *self,
304304
305305/* Special case for deleting a single character */
306306/* len(self)>=1, len(from)==1, to="", maxcount>=1 */
307- Py_LOCAL ( PyObject * )
307+ static PyObject *
308308stringlib_replace_delete_single_character (PyObject * self ,
309309 char from_c , Py_ssize_t maxcount )
310310{
@@ -348,7 +348,7 @@ stringlib_replace_delete_single_character(PyObject *self,
348348
349349/* len(self)>=1, len(from)>=2, to="", maxcount>=1 */
350350
351- Py_LOCAL ( PyObject * )
351+ static PyObject *
352352stringlib_replace_delete_substring (PyObject * self ,
353353 const char * from_s , Py_ssize_t from_len ,
354354 Py_ssize_t maxcount )
@@ -400,7 +400,7 @@ stringlib_replace_delete_substring(PyObject *self,
400400}
401401
402402/* len(self)>=1, len(from)==len(to)==1, maxcount>=1 */
403- Py_LOCAL ( PyObject * )
403+ static PyObject *
404404stringlib_replace_single_character_in_place (PyObject * self ,
405405 char from_c , char to_c ,
406406 Py_ssize_t maxcount )
@@ -447,7 +447,7 @@ stringlib_replace_single_character_in_place(PyObject *self,
447447}
448448
449449/* len(self)>=1, len(from)==len(to)>=2, maxcount>=1 */
450- Py_LOCAL ( PyObject * )
450+ static PyObject *
451451stringlib_replace_substring_in_place (PyObject * self ,
452452 const char * from_s , Py_ssize_t from_len ,
453453 const char * to_s , Py_ssize_t to_len ,
@@ -499,7 +499,7 @@ stringlib_replace_substring_in_place(PyObject *self,
499499}
500500
501501/* len(self)>=1, len(from)==1, len(to)>=2, maxcount>=1 */
502- Py_LOCAL ( PyObject * )
502+ static PyObject *
503503stringlib_replace_single_character (PyObject * self ,
504504 char from_c ,
505505 const char * to_s , Py_ssize_t to_len ,
@@ -563,7 +563,7 @@ stringlib_replace_single_character(PyObject *self,
563563}
564564
565565/* len(self)>=1, len(from)>=2, len(to)>=2, maxcount>=1 */
566- Py_LOCAL ( PyObject * )
566+ static PyObject *
567567stringlib_replace_substring (PyObject * self ,
568568 const char * from_s , Py_ssize_t from_len ,
569569 const char * to_s , Py_ssize_t to_len ,
@@ -632,7 +632,7 @@ stringlib_replace_substring(PyObject *self,
632632}
633633
634634
635- Py_LOCAL ( PyObject * )
635+ static PyObject *
636636stringlib_replace (PyObject * self ,
637637 const char * from_s , Py_ssize_t from_len ,
638638 const char * to_s , Py_ssize_t to_len ,
0 commit comments