Fix pybind11 v3.0 compatibility in callbacks.cc

PiperOrigin-RevId: 884074529
Change-Id: I20e7a8d6f6069895afbc3e18d0612f3b2edfaeb7
This commit is contained in:
Yuval Tassa
2026-03-15 12:45:44 -07:00
committed by Copybara-Service
parent 7324864366
commit 50dfc255b8
+1 -2
View File
@@ -91,8 +91,7 @@ static enable_if_not_const_t<Raw, py::handle> MjWrapperLookup(Raw* ptr) {
// TODO(stunya): Figure out a way to do this without invoking py::detail.
{
py::gil_scoped_acquire gil;
const auto [src, type] =
py::detail::type_caster_base<MjWrapper<Raw>>::src_and_type(wrapper);
auto* type = py::detail::get_type_info(typeid(MjWrapper<Raw>));
if (type) {
py::object instance = py::reinterpret_steal<py::object>(
py::detail::find_registered_python_instance(wrapper, type));