Skip to content

Commit 6f0d479

Browse files
committed
Fix an int/long mismatch identified here:
http://www.tortall.net/mu/blog/2005/12/01 Pointed out from SF #1365916. Backport candidate.
1 parent a716eab commit 6f0d479

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Python/bltinmodule.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1908,8 +1908,9 @@ builtin_sorted(PyObject *self, PyObject *args, PyObject *kwds)
19081908
PyObject *newlist, *v, *seq, *compare=NULL, *keyfunc=NULL, *newargs;
19091909
PyObject *callable;
19101910
static const char *kwlist[] = {"iterable", "cmp", "key", "reverse", 0};
1911-
long reverse;
1911+
int reverse;
19121912

1913+
/* args 1-4 should match listsort in Objects/listobject.c */
19131914
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O|OOi:sorted",
19141915
kwlist, &seq, &compare, &keyfunc, &reverse))
19151916
return NULL;

0 commit comments

Comments
 (0)