commit | 6b18a5bb3228b7af47d23941bb74d0224e2540d0 | [log] [tgz] |
---|---|---|
author | Guido van Rossum <guido@python.org> | Thu Mar 29 20:49:57 2007 +0000 |
committer | Guido van Rossum <guido@python.org> | Thu Mar 29 20:49:57 2007 +0000 |
tree | a620f6b79c935ea9b60064c921d61266d13e0ed3 | |
parent | 42dae6a89bd24073ae1b66599180cc94f15ff232 [diff] |
Fix refcounting bug reported by Amaury Forgeot d'Arc.
diff --git a/Objects/typeobject.c b/Objects/typeobject.c index be6f279..1ccd97b 100644 --- a/Objects/typeobject.c +++ b/Objects/typeobject.c
@@ -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; }