Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[core/python] Avoid using raw C typeid. #711

Merged
merged 1 commit into from
Feb 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[core/python] Avoid using raw C typeid.
  • Loading branch information
duburcqa committed Feb 9, 2024
commit d2927fe7d5d5b97f702c12a9678a447faadf4198
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 3 additions & 4 deletions python/jiminy_pywrap/include/jiminy/python/utilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,9 @@ namespace jiminy::python
having to generate them manually. It simply consists in adding some special tags on top
of the docstring, which works for now but it is not robust and may break in the future
as this is an undocumented feature. */
const bp::converter::registration * r =
bp::converter::registry::query(typeid(WrappedClassT));
assert((std::string("Class ") + typeid(WrappedClassT).name() +
" not registered to Boost Python.",
auto wrapperTypeId = bp::type_id<WrappedClassT>();
const bp::converter::registration * r = bp::converter::registry::query(wrapperTypeId);
assert((std::string("Class ") + wrapperTypeId.name() + " not registered to Boost Python.",
r != nullptr));
PyTypeObject * nsPtr = r->get_class_object();
bp::object nsName(
Expand Down
Loading