summaryrefslogtreecommitdiff
path: root/Modules/stropmodule.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1998-10-08 02:25:24 +0000
committerGuido van Rossum <guido@python.org>1998-10-08 02:25:24 +0000
commit7e48898d86aaddac7f26b7a859a7b8996dfdbea9 (patch)
treeab895a2a39069e9c005ee5e887d2292d0e7ab94e /Modules/stropmodule.c
parentb317f8aa0d1387f30c72df47bf18cb7517f45f2a (diff)
downloadcpython-git-7e48898d86aaddac7f26b7a859a7b8996dfdbea9.tar.gz
Use the t# format where appropriate. Greg Stein.
Diffstat (limited to 'Modules/stropmodule.c')
-rw-r--r--Modules/stropmodule.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/Modules/stropmodule.c b/Modules/stropmodule.c
index 85cab10267..3921d3460e 100644
--- a/Modules/stropmodule.c
+++ b/Modules/stropmodule.c
@@ -141,7 +141,7 @@ strop_splitfields(self, args)
n = 0;
splitcount = 0;
maxsplit = 0;
- if (!PyArg_ParseTuple(args, "s#|z#i", &s, &len, &sub, &n, &maxsplit))
+ if (!PyArg_ParseTuple(args, "t#|z#i", &s, &len, &sub, &n, &maxsplit))
return NULL;
if (sub == NULL)
return split_whitespace(s, len, maxsplit);
@@ -211,7 +211,7 @@ strop_joinfields(self, args)
char* p = NULL;
intargfunc getitemfunc;
- if (!PyArg_ParseTuple(args, "O|s#", &seq, &sep, &seplen))
+ if (!PyArg_ParseTuple(args, "O|t#", &seq, &sep, &seplen))
return NULL;
if (sep == NULL) {
sep = " ";
@@ -337,7 +337,7 @@ strop_find(self, args)
char *s, *sub;
int len, n, i = 0, last = INT_MAX;
- if (!PyArg_ParseTuple(args, "s#s#|ii", &s, &len, &sub, &n, &i, &last))
+ if (!PyArg_ParseTuple(args, "t#t#|ii", &s, &len, &sub, &n, &i, &last))
return NULL;
if (last > len)
@@ -382,7 +382,7 @@ strop_rfind(self, args)
int len, n, j;
int i = 0, last = INT_MAX;
- if (!PyArg_ParseTuple(args, "s#s#|ii", &s, &len, &sub, &n, &i, &last))
+ if (!PyArg_ParseTuple(args, "t#t#|ii", &s, &len, &sub, &n, &i, &last))
return NULL;
if (last > len)
@@ -417,7 +417,7 @@ do_strip(args, striptype)
int len, i, j;
- if (!PyArg_Parse(args, "s#", &s, &len))
+ if (!PyArg_Parse(args, "t#", &s, &len))
return NULL;
i = 0;
@@ -502,7 +502,7 @@ strop_lower(self, args)
PyObject *new;
int changed;
- if (!PyArg_Parse(args, "s#", &s, &n))
+ if (!PyArg_Parse(args, "t#", &s, &n))
return NULL;
new = PyString_FromStringAndSize(NULL, n);
if (new == NULL)
@@ -542,7 +542,7 @@ strop_upper(self, args)
PyObject *new;
int changed;
- if (!PyArg_Parse(args, "s#", &s, &n))
+ if (!PyArg_Parse(args, "t#", &s, &n))
return NULL;
new = PyString_FromStringAndSize(NULL, n);
if (new == NULL)
@@ -583,7 +583,7 @@ strop_capitalize(self, args)
PyObject *new;
int changed;
- if (!PyArg_Parse(args, "s#", &s, &n))
+ if (!PyArg_Parse(args, "t#", &s, &n))
return NULL;
new = PyString_FromStringAndSize(NULL, n);
if (new == NULL)
@@ -634,7 +634,7 @@ strop_count(self, args)
int i = 0, last = INT_MAX;
int m, r;
- if (!PyArg_ParseTuple(args, "s#s#|ii", &s, &len, &sub, &n, &i, &last))
+ if (!PyArg_ParseTuple(args, "t#t#|ii", &s, &len, &sub, &n, &i, &last))
return NULL;
if (last > len)
last = len;
@@ -679,7 +679,7 @@ strop_swapcase(self, args)
PyObject *new;
int changed;
- if (!PyArg_Parse(args, "s#", &s, &n))
+ if (!PyArg_Parse(args, "t#", &s, &n))
return NULL;
new = PyString_FromStringAndSize(NULL, n);
if (new == NULL)
@@ -877,7 +877,7 @@ strop_maketrans(self, args)
int i, fromlen=0, tolen=0;
PyObject *result;
- if (!PyArg_ParseTuple(args, "s#s#", &from, &fromlen, &to, &tolen))
+ if (!PyArg_ParseTuple(args, "t#t#", &from, &fromlen, &to, &tolen))
return NULL;
if (fromlen != tolen) {
@@ -920,7 +920,7 @@ strop_translate(self, args)
PyObject *result;
int trans_table[256];
- if (!PyArg_ParseTuple(args, "Ss#|s#", &input_obj,
+ if (!PyArg_ParseTuple(args, "St#|t#", &input_obj,
&table1, &tablen, &del_table, &dellen))
return NULL;
if (tablen != 256) {
@@ -1134,7 +1134,7 @@ strop_replace(self, args)
int count = 0;
PyObject *new;
- if (!PyArg_ParseTuple(args, "s#s#s#|i",
+ if (!PyArg_ParseTuple(args, "t#t#t#|i",
&str, &len, &pat, &pat_len, &sub, &sub_len,
&count))
return NULL;