5
5
/* the more complicated methods. parts of these should be pulled out into the
6
6
shared code in bytes_methods.c to cut down on duplicate code bloat. */
7
7
8
- Py_LOCAL_INLINE ( PyObject * )
8
+ static inline PyObject *
9
9
return_self (PyObject * self )
10
10
{
11
11
#if !STRINGLIB_MUTABLE
@@ -90,7 +90,7 @@ stringlib_expandtabs(PyObject *self, PyObject *args, PyObject *kwds)
90
90
return NULL ;
91
91
}
92
92
93
- Py_LOCAL_INLINE ( PyObject * )
93
+ static inline PyObject *
94
94
pad (PyObject * self , Py_ssize_t left , Py_ssize_t right , char fill )
95
95
{
96
96
PyObject * u ;
@@ -212,7 +212,7 @@ stringlib_zfill(PyObject *self, PyObject *args)
212
212
((char *)memchr((const void *)(target), c, target_len))
213
213
214
214
215
- Py_LOCAL_INLINE ( Py_ssize_t )
215
+ static Py_ssize_t
216
216
countchar (const char * target , Py_ssize_t target_len , char c ,
217
217
Py_ssize_t maxcount )
218
218
{
@@ -233,7 +233,7 @@ countchar(const char *target, Py_ssize_t target_len, char c,
233
233
/* Algorithms for different cases of string replacement */
234
234
235
235
/* len(self)>=1, from="", len(to)>=1, maxcount>=1 */
236
- Py_LOCAL ( PyObject * )
236
+ static PyObject *
237
237
stringlib_replace_interleave (PyObject * self ,
238
238
const char * to_s , Py_ssize_t to_len ,
239
239
Py_ssize_t maxcount )
@@ -304,7 +304,7 @@ stringlib_replace_interleave(PyObject *self,
304
304
305
305
/* Special case for deleting a single character */
306
306
/* len(self)>=1, len(from)==1, to="", maxcount>=1 */
307
- Py_LOCAL ( PyObject * )
307
+ static PyObject *
308
308
stringlib_replace_delete_single_character (PyObject * self ,
309
309
char from_c , Py_ssize_t maxcount )
310
310
{
@@ -348,7 +348,7 @@ stringlib_replace_delete_single_character(PyObject *self,
348
348
349
349
/* len(self)>=1, len(from)>=2, to="", maxcount>=1 */
350
350
351
- Py_LOCAL ( PyObject * )
351
+ static PyObject *
352
352
stringlib_replace_delete_substring (PyObject * self ,
353
353
const char * from_s , Py_ssize_t from_len ,
354
354
Py_ssize_t maxcount )
@@ -400,7 +400,7 @@ stringlib_replace_delete_substring(PyObject *self,
400
400
}
401
401
402
402
/* len(self)>=1, len(from)==len(to)==1, maxcount>=1 */
403
- Py_LOCAL ( PyObject * )
403
+ static PyObject *
404
404
stringlib_replace_single_character_in_place (PyObject * self ,
405
405
char from_c , char to_c ,
406
406
Py_ssize_t maxcount )
@@ -447,7 +447,7 @@ stringlib_replace_single_character_in_place(PyObject *self,
447
447
}
448
448
449
449
/* len(self)>=1, len(from)==len(to)>=2, maxcount>=1 */
450
- Py_LOCAL ( PyObject * )
450
+ static PyObject *
451
451
stringlib_replace_substring_in_place (PyObject * self ,
452
452
const char * from_s , Py_ssize_t from_len ,
453
453
const char * to_s , Py_ssize_t to_len ,
@@ -499,7 +499,7 @@ stringlib_replace_substring_in_place(PyObject *self,
499
499
}
500
500
501
501
/* len(self)>=1, len(from)==1, len(to)>=2, maxcount>=1 */
502
- Py_LOCAL ( PyObject * )
502
+ static PyObject *
503
503
stringlib_replace_single_character (PyObject * self ,
504
504
char from_c ,
505
505
const char * to_s , Py_ssize_t to_len ,
@@ -563,7 +563,7 @@ stringlib_replace_single_character(PyObject *self,
563
563
}
564
564
565
565
/* len(self)>=1, len(from)>=2, len(to)>=2, maxcount>=1 */
566
- Py_LOCAL ( PyObject * )
566
+ static PyObject *
567
567
stringlib_replace_substring (PyObject * self ,
568
568
const char * from_s , Py_ssize_t from_len ,
569
569
const char * to_s , Py_ssize_t to_len ,
@@ -632,7 +632,7 @@ stringlib_replace_substring(PyObject *self,
632
632
}
633
633
634
634
635
- Py_LOCAL ( PyObject * )
635
+ static PyObject *
636
636
stringlib_replace (PyObject * self ,
637
637
const char * from_s , Py_ssize_t from_len ,
638
638
const char * to_s , Py_ssize_t to_len ,
0 commit comments