summaryrefslogtreecommitdiffstats
path: root/Modules/mathmodule.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1990-11-18 17:36:45 (GMT)
committerGuido van Rossum <guido@python.org>1990-11-18 17:36:45 (GMT)
commiteb38d2411c9ed3c1aeedc974e20e20a95c87427e (patch)
tree22d0df8aa2a841e3d5c9d88a1e4d039bd9ea068b /Modules/mathmodule.c
parent330497564798cd231b8bac991c35807b131d9a56 (diff)
downloadcpython-eb38d2411c9ed3c1aeedc974e20e20a95c87427e.zip
cpython-eb38d2411c9ed3c1aeedc974e20e20a95c87427e.tar.gz
cpython-eb38d2411c9ed3c1aeedc974e20e20a95c87427e.tar.bz2
DECREF pi and e after inserting in symbol table.
Diffstat (limited to 'Modules/mathmodule.c')
-rw-r--r--Modules/mathmodule.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/Modules/mathmodule.c b/Modules/mathmodule.c
index 93b24fc..218658f 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);
}