mirror of
https://github.com/RYDE-WORK/pybind11.git
synced 2026-02-02 13:15:52 +08:00
Fix a segfault where func object wasn't released
This commit is contained in:
parent
01f7409550
commit
fc5620afa6
@ -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() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user