diff options
author | Guido van Rossum <guido@python.org> | 1997-05-14 18:43:29 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1997-05-14 18:43:29 (GMT) |
commit | e61093c2187472c5761e7c282aa579c37967018e (patch) | |
tree | a04d9c9d36284be254aca2bc13230c67b05368be /Objects/abstract.c | |
parent | fcc7704ee983458ff226a8ab8b096c1b593131b3 (diff) | |
download | cpython-e61093c2187472c5761e7c282aa579c37967018e.zip cpython-e61093c2187472c5761e7c282aa579c37967018e.tar.gz cpython-e61093c2187472c5761e7c282aa579c37967018e.tar.bz2 |
Fix reversed test for failure in PySequence_List() and PySequence_Tuple().
This broke cPickle.
Diffstat (limited to 'Objects/abstract.c')
-rw-r--r-- | Objects/abstract.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/abstract.c b/Objects/abstract.c index eebeacd..b6d4dda 100644 --- a/Objects/abstract.c +++ b/Objects/abstract.c @@ -806,7 +806,7 @@ PySequence_Tuple(s) for(i=0; i < l; i++) { - if(((item=PySequence_GetItem(s,i))) || + if(!(item=PySequence_GetItem(s,i)) || PyTuple_SetItem(t,i,item) == -1) { Py_DECREF(t); @@ -830,7 +830,7 @@ PySequence_List(s) for(i=0; i < l; i++) { - if((item=PySequence_GetItem(s,i)) || + if(!(item=PySequence_GetItem(s,i)) || PyList_SetItem(t,i,item) == -1) { Py_DECREF(t); |