summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1997-05-14 18:43:29 (GMT)
committerGuido van Rossum <guido@python.org>1997-05-14 18:43:29 (GMT)
commite61093c2187472c5761e7c282aa579c37967018e (patch)
treea04d9c9d36284be254aca2bc13230c67b05368be /Objects
parentfcc7704ee983458ff226a8ab8b096c1b593131b3 (diff)
downloadcpython-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')
-rw-r--r--Objects/abstract.c4
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);