Merge branch 'pybind:master' into master

This commit is contained in:
Steve R. Sun 2022-05-26 09:02:09 +08:00 committed by GitHub
commit 0ca3c2c3e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1566,7 +1566,8 @@ public:
scope(*this),
sibling(getattr(*this, name_, none())),
extra...);
attr(cf.name()) = staticmethod(cf);
auto cf_name = cf.name();
attr(std::move(cf_name)) = staticmethod(std::move(cf));
return *this;
}
@ -1620,7 +1621,7 @@ public:
if (!caster.load(obj, false)) {
return nullptr;
}
return new buffer_info(((capture *) ptr)->func(caster));
return new buffer_info(((capture *) ptr)->func(std::move(caster)));
},
ptr);
weakref(m_ptr, cpp_function([ptr](handle wr) {