Mercurial > cpython-lru_cache-weakref
diff Modules/mathmodule.c @ 75:85eed060a46c legacy-trunk
DECREF pi and e after inserting in symbol table.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Sun, 18 Nov 1990 17:36:45 +0000 |
| parents | 4835c2d38b84 |
| children | a6934380c6e7 |
line wrap: on
line diff
--- a/Modules/mathmodule.c Sun Nov 18 17:36:26 1990 +0000 +++ b/Modules/mathmodule.c Sun Nov 18 17:36:45 1990 +0000 @@ -153,6 +153,8 @@ 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); }
