Skip to content
Snippets Groups Projects
Unverified Commit 6552b9ac authored by Justin Carpentier's avatar Justin Carpentier
Browse files

core: avoid duplicate registration

parent e576541a
No related branches found
No related tags found
No related merge requests found
Pipeline #43870 passed with warnings
...@@ -8,10 +8,16 @@ ...@@ -8,10 +8,16 @@
#include <boost/python.hpp> #include <boost/python.hpp>
#include <boost/type_index.hpp> #include <boost/type_index.hpp>
#include "eigenpy/registration.hpp"
namespace bp = boost::python; namespace bp = boost::python;
namespace eigenpy {
void exposeStdTypeIndex() { void exposeStdTypeIndex() {
typedef std::type_index Self; typedef std::type_index Self;
if (register_symbolic_link_to_registered_type<Self>()) return;
bp::class_<Self>( bp::class_<Self>(
"std_type_index", "std_type_index",
"The class type_index holds implementation-specific information about a " "The class type_index holds implementation-specific information about a "
...@@ -42,6 +48,8 @@ void exposeStdTypeIndex() { ...@@ -42,6 +48,8 @@ void exposeStdTypeIndex() {
void exposeBoostTypeIndex() { void exposeBoostTypeIndex() {
typedef boost::typeindex::type_index Self; typedef boost::typeindex::type_index Self;
if (register_symbolic_link_to_registered_type<Self>()) return;
bp::class_<Self>( bp::class_<Self>(
"boost_type_index", "boost_type_index",
"The class type_index holds implementation-specific information about a " "The class type_index holds implementation-specific information about a "
...@@ -66,7 +74,6 @@ void exposeBoostTypeIndex() { ...@@ -66,7 +74,6 @@ void exposeBoostTypeIndex() {
"Human readible name."); "Human readible name.");
} }
namespace eigenpy {
void exposeTypeInfo() { void exposeTypeInfo() {
exposeStdTypeIndex(); exposeStdTypeIndex();
exposeBoostTypeIndex(); exposeBoostTypeIndex();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment