summaryrefslogtreecommitdiff
path: root/Objects/stringobject.c
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2002-12-29 16:33:45 +0000
committerRaymond Hettinger <python@rcn.com>2002-12-29 16:33:45 +0000
commite16c55928dff37e7c82ae7f16d4b92853bea57ad (patch)
treeafa001f819c21218ae9c3677069c8abd17e5a556 /Objects/stringobject.c
parent6e97777c5512e6bcde15272416f0a4d515427df1 (diff)
downloadcpython-e16c55928dff37e7c82ae7f16d4b92853bea57ad.tar.gz
SF patch #659536: Use PyArg_UnpackTuple where possible.
Obtain cleaner coding and a system wide performance boost by using the fast, pre-parsed PyArg_Unpack function instead of PyArg_ParseTuple function which is driven by a format string.
Diffstat (limited to 'Objects/stringobject.c')
-rw-r--r--Objects/stringobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/stringobject.c b/Objects/stringobject.c
index 7937b46a3d..1e42856729 100644
--- a/Objects/stringobject.c
+++ b/Objects/stringobject.c
@@ -2046,7 +2046,7 @@ string_translate(PyStringObject *self, PyObject *args)
int trans_table[256];
PyObject *tableobj, *delobj = NULL;
- if (!PyArg_ParseTuple(args, "O|O:translate",
+ if (!PyArg_UnpackTuple(args, "translate", 1, 2,
&tableobj, &delobj))
return NULL;