summaryrefslogtreecommitdiff
path: root/Objects/sliceobject.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
commitea3fdf44a29accd666a3b5f058539c351d921657 (patch)
treeabf57eaa340195873a649d2d42d50e0dba856064 /Objects/sliceobject.c
parentf8bcfb13f126d3990dbccecb48a3d74b11e7841e (diff)
downloadcpython-git-ea3fdf44a29accd666a3b5f058539c351d921657.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/sliceobject.c')
-rw-r--r--Objects/sliceobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/sliceobject.c b/Objects/sliceobject.c
index 7198cca4b1..796df2bb0c 100644
--- a/Objects/sliceobject.c
+++ b/Objects/sliceobject.c
@@ -174,7 +174,7 @@ slice_new(PyTypeObject *type, PyObject *args, PyObject *kw)
start = stop = step = NULL;
- if (!PyArg_ParseTuple(args, "O|OO:slice", &start, &stop, &step))
+ if (!PyArg_UnpackTuple(args, "slice", 1, 3, &start, &stop, &step))
return NULL;
/* This swapping of stop and start is to maintain similarity with