[Python-Dev] [Python-checkins] cpython: Issue #9566: Fix a compiler warning in tupleiter_setstate() on Windows x64 (original) (raw)

Victor Stinner victor.stinner at gmail.com
Tue Jun 25 00:00:41 CEST 2013


Ah yes correct, it should be better with the following commit: http://hg.python.org/cpython/rev/3a393fc86b29

Victor

2013/6/24 Jeremy Kloth <jeremy.kloth at gmail.com>:

On Mon, Jun 24, 2013 at 3:33 PM, victor.stinner <python-checkins at python.org> wrote:

http://hg.python.org/cpython/rev/6b4d279508a3 changeset: 84325:6b4d279508a3 user: Victor Stinner <victor.stinner at gmail.com> date: Mon Jun 24 23:31:48 2013 +0200 summary: Issue #9566: Fix a compiler warning in tupleitersetstate() on Windows x64 ... static PyObject * tupleitersetstate(tupleiterobject *it, PyObject *state) { - long index = PyLongAsLong(state); + Pyssizet index = PyLongAsLong(state); Actually, this will still lose data when state > MAXINT (on Windows). It should be changed to PyLongAsSssizet(state) to ensure consistent behavior on all platforms.



More information about the Python-Dev mailing list