Commit a60b7d0e authored by Boxiang Sun's avatar Boxiang Sun

decref the float object when no longer need it anymore

parent 9f89ae2b
......@@ -163,7 +163,10 @@ extern "C" double PyFloat_AsDouble(PyObject* o) noexcept {
return -1;
}
return static_cast<BoxedFloat*>(fo)->d;
val = static_cast<BoxedFloat*>(fo)->d;
Py_DECREF(fo);
return val;
}
template <typename T> static inline void raiseDivZeroExcIfZero(T var) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment