mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Fix an int/long mismatch identified here:
http://www.tortall.net/mu/blog/2005/12/01 Pointed out from SF #1365916. Backport candidate.
This commit is contained in:
parent
a716eabca7
commit
6f0d479c78
1 changed files with 2 additions and 1 deletions
|
@ -1908,8 +1908,9 @@ builtin_sorted(PyObject *self, PyObject *args, PyObject *kwds)
|
||||||
PyObject *newlist, *v, *seq, *compare=NULL, *keyfunc=NULL, *newargs;
|
PyObject *newlist, *v, *seq, *compare=NULL, *keyfunc=NULL, *newargs;
|
||||||
PyObject *callable;
|
PyObject *callable;
|
||||||
static const char *kwlist[] = {"iterable", "cmp", "key", "reverse", 0};
|
static const char *kwlist[] = {"iterable", "cmp", "key", "reverse", 0};
|
||||||
long reverse;
|
int reverse;
|
||||||
|
|
||||||
|
/* args 1-4 should match listsort in Objects/listobject.c */
|
||||||
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O|OOi:sorted",
|
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O|OOi:sorted",
|
||||||
kwlist, &seq, &compare, &keyfunc, &reverse))
|
kwlist, &seq, &compare, &keyfunc, &reverse))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue