Author: guido.van.rossum
Date: Thu Mar 29 22:49:57 2007
New Revision: 54609

Modified:
   python/branches/p3yk/Objects/typeobject.c
Log:
Fix refcounting bug reported by Amaury Forgeot d'Arc.


Modified: python/branches/p3yk/Objects/typeobject.c
==============================================================================
--- python/branches/p3yk/Objects/typeobject.c   (original)
+++ python/branches/p3yk/Objects/typeobject.c   Thu Mar 29 22:49:57 2007
@@ -2311,6 +2311,7 @@
 
        case Py_EQ:
                res = (self == other) ? Py_True : Py_False;
+               Py_INCREF(res);
                break;
 
        case Py_NE:
@@ -2334,10 +2335,10 @@
 
        default:
                res = Py_NotImplemented;
+               Py_INCREF(res);
                break;
        }
 
-       Py_INCREF(res);
        return res;
 }
 
_______________________________________________
Python-3000-checkins mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000-checkins

Reply via email to