mirror of
https://github.com/pybind/pybind11.git
synced 2026-04-20 06:49:25 +00:00
chore: Change numpy dtype from_args call sig to const ref (#3878)
* Change numpy from_args call signature to avoid copy * Reorder ctors * Rename arg * Fix unnecessary move * Fix clang-tidy and Add a few missing moves to memory_view pytype
This commit is contained in:
@@ -610,5 +610,5 @@ TEST_SUBMODULE(numpy_dtypes, m) {
|
||||
[]() { PYBIND11_NUMPY_DTYPE(SimpleStruct, bool_, uint_, float_, ldbl_); });
|
||||
|
||||
// test_str_leak
|
||||
m.def("dtype_wrapper", [](py::object d) { return py::dtype::from_args(std::move(d)); });
|
||||
m.def("dtype_wrapper", [](const py::object &d) { return py::dtype::from_args(d); });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user