summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorAndrew M. Kuchling <amk@amk.ca>2006-09-29 17:52:32 (GMT)
committerAndrew M. Kuchling <amk@amk.ca>2006-09-29 17:52:32 (GMT)
commit21e2af3562024d3bdf0bb90eb6f766bc16ec97ca (patch)
treea49b255c300f6db9ca515bd84fc277aa25bc3134 /Python
parent100e7d77f27e232aa43e84c1c66080a08b651058 (diff)
downloadcpython-21e2af3562024d3bdf0bb90eb6f766bc16ec97ca.zip
cpython-21e2af3562024d3bdf0bb90eb6f766bc16ec97ca.tar.gz
cpython-21e2af3562024d3bdf0bb90eb6f766bc16ec97ca.tar.bz2
[Backport rev. 41696 by neal.norwitz]
Fix an int/long mismatch identified here: http://www.tortall.net/mu/blog/2005/12/01 Pointed out from SF #1365916. Backport candidate.
Diffstat (limited to 'Python')
-rw-r--r--Python/bltinmodule.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c
index 6d30391..bf61640 100644
--- a/Python/bltinmodule.c
+++ b/Python/bltinmodule.c
@@ -1811,9 +1811,10 @@ builtin_sorted(PyObject *self, PyObject *args, PyObject *kwds)
PyObject *newlist, *v, *seq, *compare=NULL, *keyfunc=NULL, *newargs;
PyObject *callable;
static char *kwlist[] = {"iterable", "cmp", "key", "reverse", 0};
- long reverse;
+ int reverse;
if (args != NULL) {
+ /* args 1-4 should match listsort in Objects/listobject.c */
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O|OOi:sorted",
kwlist, &seq, &compare, &keyfunc, &reverse))
return NULL;