Skip to content

Commit 7f3b381

Browse files
Replace Pybind11 get_type() usages by py::type::of (#1194)
1 parent 1e44ca2 commit 7f3b381

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/py-opentimelineio/opentime-bindings/opentime_rationalTime.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ RationalTime _type_checked(py::object const& rhs, char const* op) {
5050
return py::cast<RationalTime>(rhs);
5151
}
5252
catch (...) {
53-
std::string rhs_type = py::cast<std::string>(rhs.get_type().attr("__name__"));
53+
std::string rhs_type = py::cast<std::string>(py::type::of(rhs).attr("__name__"));
5454
throw py::type_error(string_printf("unsupported operand type(s) for %s: "
5555
"RationalTime and %s", op, rhs_type.c_str()));
5656
}

0 commit comments

Comments
 (0)