Skip to content

Commit 26b14d5

Browse files
committed
registration.hpp : apply suggested incref() fix
1 parent ca62090 commit 26b14d5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

include/eigenpy/registration.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ inline bool register_symbolic_link_to_registered_type() {
4545
const bp::converter::registration* reg =
4646
bp::converter::registry::query(info);
4747
bp::handle<> class_obj(reg->get_class_object());
48+
bp::incref(class_obj.get());
4849
bp::scope().attr(reg->get_class_object()->tp_name) = bp::object(class_obj);
4950
return true;
5051
}
@@ -61,6 +62,7 @@ inline bool register_symbolic_link_to_registered_type(const Visitor& visitor) {
6162
const bp::converter::registration* reg =
6263
bp::converter::registry::query(info);
6364
bp::handle<> class_obj(reg->get_class_object());
65+
bp::incref(class_obj.get());
6466
bp::object object(class_obj);
6567
bp::scope().attr(reg->get_class_object()->tp_name) = object;
6668
registration_class<T> cl(object);

0 commit comments

Comments
 (0)