Skip to content

Commit 30e4a49

Browse files
committed
core: Rename VariantConvertor into VariantConverter and fix tests
1 parent 706a027 commit 30e4a49

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

include/eigenpy/variant.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,17 +153,17 @@ struct ReturnInternalVariant : boost::python::return_internal_reference<> {
153153
/// void expose() {
154154
/// boost::python::class_<Struct1>("Struct1", bp::init<>());
155155
/// boost::python::class_<Struct2>("Struct1", bp::init<>())
156-
/// typedef eigenpy::VariantConvertor<MyVariant> Convertor;
157-
/// Convertor::registration();
156+
/// typedef eigenpy::VariantConverter<MyVariant> Converter;
157+
/// Converter::registration();
158158
///
159159
/// boost::python::class_<VariantHolder>("VariantHolder", bp::init<>())
160160
/// .add_property("variant",
161161
/// bp::make_getter(&VariantHolder::variant,
162-
/// Convertor::return_internal_reference()),
162+
/// Converter::return_internal_reference()),
163163
/// bp::make_setter(&VariantHolder::variant));
164164
/// }
165165
template <typename Variant>
166-
struct VariantConvertor {
166+
struct VariantConverter {
167167
typedef Variant variant_type;
168168
typedef ReturnInternalVariant<variant_type> return_internal_reference;
169169

unittest/boost_variant.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/// @copyright Copyright 2024 CNRS INRIA
33

44
#include <eigenpy/eigenpy.hpp>
5-
#include <eigenpy/boost-variant.hpp>
5+
#include <eigenpy/variant.hpp>
66

77
namespace bp = boost::python;
88

@@ -28,14 +28,14 @@ BOOST_PYTHON_MODULE(boost_variant) {
2828
bp::class_<V1>("V1", bp::init<>()).def_readwrite("v", &V1::v);
2929
bp::class_<V2>("V2", bp::init<>()).def_readwrite("v", &V2::v);
3030

31-
typedef eigenpy::BoostVariantConvertor<MyVariant> Convertor;
32-
Convertor::registration();
31+
typedef eigenpy::VariantConverter<MyVariant> Converter;
32+
Converter::registration();
3333

3434
bp::def("make_variant", make_variant);
3535

3636
boost::python::class_<VariantHolder>("VariantHolder", bp::init<>())
3737
.add_property("variant",
3838
bp::make_getter(&VariantHolder::variant,
39-
Convertor::return_internal_reference()),
39+
Converter::return_internal_reference()),
4040
bp::make_setter(&VariantHolder::variant));
4141
}

0 commit comments

Comments
 (0)