From: Guido van Rossum Date: Sun, 18 Nov 1990 17:36:45 +0000 (+0000) Subject: DECREF pi and e after inserting in symbol table. X-Git-Tag: v0.9.8~1108 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=eb38d2411c9ed3c1aeedc974e20e20a95c87427e;p=thirdparty%2FPython%2Fcpython.git DECREF pi and e after inserting in symbol table. --- diff --git a/Modules/mathmodule.c b/Modules/mathmodule.c index 93b24fc2a71f..218658f448b9 100644 --- a/Modules/mathmodule.c +++ b/Modules/mathmodule.c @@ -153,6 +153,8 @@ initmath() m = initmodule("math", math_methods); d = getmoduledict(m); - dictinsert(d, "pi", newfloatobject(atan(1.0) * 4.0)); - dictinsert(d, "e", newfloatobject(exp(1.0))); + dictinsert(d, "pi", v = newfloatobject(atan(1.0) * 4.0)); + DECREF(v); + dictinsert(d, "e", v = newfloatobject(exp(1.0))); + DECREF(v); }