DECREF pi and e after inserting in symbol table.
This commit is contained in:
parent
3304975647
commit
eb38d2411c
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue