From eb38d2411c9ed3c1aeedc974e20e20a95c87427e Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Sun, 18 Nov 1990 17:36:45 +0000 Subject: [PATCH] DECREF pi and e after inserting in symbol table. --- Modules/mathmodule.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Modules/mathmodule.c b/Modules/mathmodule.c index 93b24fc2a71..218658f448b 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); }