diff options
| author | Martin v. Löwis <martin@v.loewis.de> | 2012-05-15 14:34:58 +0200 |
|---|---|---|
| committer | Martin v. Löwis <martin@v.loewis.de> | 2012-05-15 14:34:58 +0200 |
| commit | 33cac8578bede2e9d6688ff46e849df7c2897a26 (patch) | |
| tree | 7ed84d2007f86f22a748afdf1de6e359bc7f78bb | |
| parent | d1b7f3993a57bd95c9a307768d01782237e973e7 (diff) | |
| download | cpython-git-33cac8578bede2e9d6688ff46e849df7c2897a26.tar.gz | |
Add safecase to silence Win64 warning.
| -rw-r--r-- | Modules/itertoolsmodule.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/itertoolsmodule.c b/Modules/itertoolsmodule.c index 515f3bafb3..194f7fb5a3 100644 --- a/Modules/itertoolsmodule.c +++ b/Modules/itertoolsmodule.c @@ -533,7 +533,8 @@ teedataobject_new(PyTypeObject *type, PyObject *args, PyObject *kw) tdo->values[i] = PyList_GET_ITEM(values, i); Py_INCREF(tdo->values[i]); } - tdo->numread = len; + /* len <= LINKCELLS < INT_MAX */ + tdo->numread = Py_SAFE_DOWNCAST(len, Py_ssize_t, int); if (len == LINKCELLS) { if (next != Py_None) { |
