Commit fc5620af by Ivan Smirnov

Fix a segfault where func object wasn't released

parent 01f74095
...@@ -150,9 +150,10 @@ public: ...@@ -150,9 +150,10 @@ public:
} }
private: private:
static object& _dtype_from_pep3118() { static object _dtype_from_pep3118() {
static object obj = module::import("numpy.core._internal").attr("_dtype_from_pep3118"); static PyObject *obj = module::import("numpy.core._internal")
return obj; .attr("_dtype_from_pep3118").cast<object>().release().ptr();
return object(obj, true);
} }
dtype strip_padding() { dtype strip_padding() {
......
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