@@ -141,7 +141,7 @@ strop_splitfields(self, args)
141141 n = 0 ;
142142 splitcount = 0 ;
143143 maxsplit = 0 ;
144- if (!PyArg_ParseTuple (args , "s #|z#i" , & s , & len , & sub , & n , & maxsplit ))
144+ if (!PyArg_ParseTuple (args , "t #|z#i" , & s , & len , & sub , & n , & maxsplit ))
145145 return NULL ;
146146 if (sub == NULL )
147147 return split_whitespace (s , len , maxsplit );
@@ -211,7 +211,7 @@ strop_joinfields(self, args)
211211 char * p = NULL ;
212212 intargfunc getitemfunc ;
213213
214- if (!PyArg_ParseTuple (args , "O|s #" , & seq , & sep , & seplen ))
214+ if (!PyArg_ParseTuple (args , "O|t #" , & seq , & sep , & seplen ))
215215 return NULL ;
216216 if (sep == NULL ) {
217217 sep = " " ;
@@ -337,7 +337,7 @@ strop_find(self, args)
337337 char * s , * sub ;
338338 int len , n , i = 0 , last = INT_MAX ;
339339
340- if (!PyArg_ParseTuple (args , "s#s #|ii" , & s , & len , & sub , & n , & i , & last ))
340+ if (!PyArg_ParseTuple (args , "t#t #|ii" , & s , & len , & sub , & n , & i , & last ))
341341 return NULL ;
342342
343343 if (last > len )
@@ -382,7 +382,7 @@ strop_rfind(self, args)
382382 int len , n , j ;
383383 int i = 0 , last = INT_MAX ;
384384
385- if (!PyArg_ParseTuple (args , "s#s #|ii" , & s , & len , & sub , & n , & i , & last ))
385+ if (!PyArg_ParseTuple (args , "t#t #|ii" , & s , & len , & sub , & n , & i , & last ))
386386 return NULL ;
387387
388388 if (last > len )
@@ -417,7 +417,7 @@ do_strip(args, striptype)
417417 int len , i , j ;
418418
419419
420- if (!PyArg_Parse (args , "s #" , & s , & len ))
420+ if (!PyArg_Parse (args , "t #" , & s , & len ))
421421 return NULL ;
422422
423423 i = 0 ;
@@ -502,7 +502,7 @@ strop_lower(self, args)
502502 PyObject * new ;
503503 int changed ;
504504
505- if (!PyArg_Parse (args , "s #" , & s , & n ))
505+ if (!PyArg_Parse (args , "t #" , & s , & n ))
506506 return NULL ;
507507 new = PyString_FromStringAndSize (NULL , n );
508508 if (new == NULL )
@@ -542,7 +542,7 @@ strop_upper(self, args)
542542 PyObject * new ;
543543 int changed ;
544544
545- if (!PyArg_Parse (args , "s #" , & s , & n ))
545+ if (!PyArg_Parse (args , "t #" , & s , & n ))
546546 return NULL ;
547547 new = PyString_FromStringAndSize (NULL , n );
548548 if (new == NULL )
@@ -583,7 +583,7 @@ strop_capitalize(self, args)
583583 PyObject * new ;
584584 int changed ;
585585
586- if (!PyArg_Parse (args , "s #" , & s , & n ))
586+ if (!PyArg_Parse (args , "t #" , & s , & n ))
587587 return NULL ;
588588 new = PyString_FromStringAndSize (NULL , n );
589589 if (new == NULL )
@@ -634,7 +634,7 @@ strop_count(self, args)
634634 int i = 0 , last = INT_MAX ;
635635 int m , r ;
636636
637- if (!PyArg_ParseTuple (args , "s#s #|ii" , & s , & len , & sub , & n , & i , & last ))
637+ if (!PyArg_ParseTuple (args , "t#t #|ii" , & s , & len , & sub , & n , & i , & last ))
638638 return NULL ;
639639 if (last > len )
640640 last = len ;
@@ -679,7 +679,7 @@ strop_swapcase(self, args)
679679 PyObject * new ;
680680 int changed ;
681681
682- if (!PyArg_Parse (args , "s #" , & s , & n ))
682+ if (!PyArg_Parse (args , "t #" , & s , & n ))
683683 return NULL ;
684684 new = PyString_FromStringAndSize (NULL , n );
685685 if (new == NULL )
@@ -877,7 +877,7 @@ strop_maketrans(self, args)
877877 int i , fromlen = 0 , tolen = 0 ;
878878 PyObject * result ;
879879
880- if (!PyArg_ParseTuple (args , "s#s #" , & from , & fromlen , & to , & tolen ))
880+ if (!PyArg_ParseTuple (args , "t#t #" , & from , & fromlen , & to , & tolen ))
881881 return NULL ;
882882
883883 if (fromlen != tolen ) {
@@ -920,7 +920,7 @@ strop_translate(self, args)
920920 PyObject * result ;
921921 int trans_table [256 ];
922922
923- if (!PyArg_ParseTuple (args , "Ss#|s #" , & input_obj ,
923+ if (!PyArg_ParseTuple (args , "St#|t #" , & input_obj ,
924924 & table1 , & tablen , & del_table , & dellen ))
925925 return NULL ;
926926 if (tablen != 256 ) {
@@ -1134,7 +1134,7 @@ strop_replace(self, args)
11341134 int count = 0 ;
11351135 PyObject * new ;
11361136
1137- if (!PyArg_ParseTuple (args , "s#s#s #|i" ,
1137+ if (!PyArg_ParseTuple (args , "t#t#t #|i" ,
11381138 & str , & len , & pat , & pat_len , & sub , & sub_len ,
11391139 & count ))
11401140 return NULL ;
0 commit comments