[Python-Dev] [Python-checkins] cpython: Issue #9566: Fix a compiler warning in tupleiter_setstate() on Windows x64 (original) (raw)
Jeremy Kloth jeremy.kloth at gmail.com
Mon Jun 24 23:48:24 CEST 2013
- Previous message: [Python-Dev] [Python-checkins] cpython (2.7): Issue #18277: Document quirks of multiprocessing queue.
- Next message: [Python-Dev] [Python-checkins] cpython: Issue #9566: Fix a compiler warning in tupleiter_setstate() on Windows x64
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
files: Objects/tupleobject.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Objects/tupleobject.c b/Objects/tupleobject.c --- a/Objects/tupleobject.c +++ b/Objects/tupleobject.c @@ -997,7 +997,7 @@ static PyObject * tupleitersetstate(tupleiterobject *it, PyObject *state) { - long index = PyLongAsLong(state); + Pyssizet index = PyLongAsLong(state);
Actually, this will still lose data when state > MAX_INT (on Windows). It should be changed to PyLong_AsSssize_t(state) to ensure consistent behavior on all platforms.
-- Jeremy Kloth
- Previous message: [Python-Dev] [Python-checkins] cpython (2.7): Issue #18277: Document quirks of multiprocessing queue.
- Next message: [Python-Dev] [Python-checkins] cpython: Issue #9566: Fix a compiler warning in tupleiter_setstate() on Windows x64
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]