Skip to content

Fixed segfault in loadConstructors() for aliased types #1

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
EXTRA_CMAKE_FLAGS=-DORO_USE_ROSBUILD=ON
include $(shell rospack find mk)/cmake.mk
12 changes: 2 additions & 10 deletions StdintTypekit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,8 @@ std::string StdintTypekitPlugin::getName() {
template<typename T>
bool StdintTypekitPlugin::addTypeOrAlias(const std::string name) {
log(Debug) << "addTypeOrAlias<" << typeid(T).name() << ">(" << name << ")" << endlog();
TypeInfo* t = ti->getTypeInfo<T> ();
if (t == NULL)
return ti->addType(new StdTypeInfo<T> (name.c_str()));
else {
log(Warning) << "RTT type repository already knows type '" << name
<< "' as type '" << t->getTypeName() << "'. Aliasing type '"
<< t->getTypeName() << "'" << endlog();
aliased[name] = true;
return true;//ti->aliasType(name, t);
}
// Note: TypeInfoRepository::addType() adds an alias automatically if the type is already registered.
return ti->addType(new StdTypeInfo<T> (name.c_str()));
}

bool StdintTypekitPlugin::loadTypes() {
Expand Down
2 changes: 1 addition & 1 deletion manifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
</copyright>
<license>LGPL</license>

<depend package="rtt"/>
<rosdep name="rtt"/>
</package>

12 changes: 12 additions & 0 deletions package.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<package format="2">
<name>stdint</name>
<version>1.0.0</version>
<description>Stdint typekit for Orocos RTT. This package provides a typekit for Orocos that defines standard int types:
(int8) int16 int32 int64 (uint8) uint16 uint32 uint64.</description>
<maintainer email="[email protected]">Orocos Developers</maintainer>
<license>LGPL</license>
<author email="[email protected]">Charles Lesire-Cabaniols</author>

<depend>rtt</depend>
</package>