summaryrefslogtreecommitdiffstats
path: root/Modules/mpzmodule.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1998-10-08 02:25:24 (GMT)
committerGuido van Rossum <guido@python.org>1998-10-08 02:25:24 (GMT)
commit7e48898d86aaddac7f26b7a859a7b8996dfdbea9 (patch)
treeab895a2a39069e9c005ee5e887d2292d0e7ab94e /Modules/mpzmodule.c
parentb317f8aa0d1387f30c72df47bf18cb7517f45f2a (diff)
downloadcpython-7e48898d86aaddac7f26b7a859a7b8996dfdbea9.zip
cpython-7e48898d86aaddac7f26b7a859a7b8996dfdbea9.tar.gz
cpython-7e48898d86aaddac7f26b7a859a7b8996dfdbea9.tar.bz2
Use the t# format where appropriate. Greg Stein.
Diffstat (limited to 'Modules/mpzmodule.c')
-rw-r--r--Modules/mpzmodule.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/Modules/mpzmodule.c b/Modules/mpzmodule.c
index 0400605..4299f45 100644
--- a/Modules/mpzmodule.c
+++ b/Modules/mpzmodule.c
@@ -969,12 +969,9 @@ MPZ_mpz(self, args)
mpz_clear(&mplongdigit);
}
else if (PyString_Check(objp)) {
- char *cp;
- int len;
+ char *cp = PyString_AS_STRING(objp);
+ int len = PyString_GET_SIZE(objp);
MP_INT mplongdigit;
-
- if (!PyArg_Parse(objp, "s#", &cp, &len))
- return NULL;
if ((mpzp = newmpzobject()) == NULL)
return NULL;