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

rename rosidl_generator_c 'namespace' to rosidl_runtime_c #458

Merged
merged 2 commits into from
Apr 11, 2020
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
2 changes: 1 addition & 1 deletion rosidl_generator_c/resource/action__type_support.h.em
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@# Included from rosidl_generator_c/resource/idl__type_support.h.em
@{header_file = 'rosidl_generator_c/action_type_support_struct.h'}@
@{header_file = 'rosidl_runtime_c/action_type_support_struct.h'}@
@[if header_file in include_directives]@
// already included above
// @
Expand Down
2 changes: 1 addition & 1 deletion rosidl_generator_c/resource/idl__functions.h.em
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ extern "C"
#include <stdbool.h>
#include <stdlib.h>

#include "rosidl_generator_c/visibility_control.h"
#include "rosidl_runtime_c/visibility_control.h"
#include "@(package_name)/msg/rosidl_generator_c__visibility_control.h"

#include "@(include_base)__struct.h"
Expand Down
6 changes: 3 additions & 3 deletions rosidl_generator_c/resource/msg__functions.c.em
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,18 @@ includes = OrderedDict()
for member in message.structure.members:
if isinstance(member.type, AbstractSequence) and isinstance(member.type.value_type, BasicType):
member_names = includes.setdefault(
'rosidl_generator_c/primitives_sequence_functions.h', [])
'rosidl_runtime_c/primitives_sequence_functions.h', [])
member_names.append(member.name)
continue
type_ = member.type
if isinstance(type_, AbstractNestedType):
type_ = type_.value_type
if isinstance(type_, AbstractString):
member_names = includes.setdefault('rosidl_generator_c/string_functions.h', [])
member_names = includes.setdefault('rosidl_runtime_c/string_functions.h', [])
member_names.append(member.name)
elif isinstance(type_, AbstractWString):
member_names = includes.setdefault(
'rosidl_generator_c/u16string_functions.h', [])
'rosidl_runtime_c/u16string_functions.h', [])
member_names.append(member.name)
elif isinstance(type_, NamespacedType):
include_prefix = idl_structure_type_to_c_include_prefix(type_)
Expand Down
6 changes: 3 additions & 3 deletions rosidl_generator_c/resource/msg__struct.h.em
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,18 @@ includes = OrderedDict()
for member in message.structure.members:
if isinstance(member.type, AbstractSequence) and isinstance(member.type.value_type, BasicType):
member_names = includes.setdefault(
'rosidl_generator_c/primitives_sequence.h', [])
'rosidl_runtime_c/primitives_sequence.h', [])
member_names.append(member.name)
continue
type_ = member.type
if isinstance(type_, AbstractNestedType):
type_ = type_.value_type
if isinstance(type_, AbstractString):
member_names = includes.setdefault('rosidl_generator_c/string.h', [])
member_names = includes.setdefault('rosidl_runtime_c/string.h', [])
member_names.append(member.name)
elif isinstance(type_, AbstractWString):
member_names = includes.setdefault(
'rosidl_generator_c/u16string.h', [])
'rosidl_runtime_c/u16string.h', [])
member_names.append(member.name)
elif isinstance(type_, NamespacedType):
include_prefix = idl_structure_type_to_c_include_prefix(type_)
Expand Down
2 changes: 1 addition & 1 deletion rosidl_generator_c/resource/msg__type_support.h.em
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@# Included from rosidl_generator_c/resource/idl__type_support.h.em
@{header_file = 'rosidl_generator_c/message_type_support_struct.h'}@
@{header_file = 'rosidl_runtime_c/message_type_support_struct.h'}@
@[if header_file in include_directives]@
// already included above
// @
Expand Down
2 changes: 1 addition & 1 deletion rosidl_generator_c/resource/srv__type_support.h.em
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ TEMPLATE(
include_directives=include_directives)
}@

@{header_file = 'rosidl_generator_c/service_type_support_struct.h'}@
@{header_file = 'rosidl_runtime_c/service_type_support_struct.h'}@
@[if header_file in include_directives]@
// already included above
// @
Expand Down
6 changes: 3 additions & 3 deletions rosidl_generator_c/rosidl_generator_c/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def idl_type_to_c(type_):
assert False, 'The array size is part of the variable'
if isinstance(type_, AbstractSequence):
if isinstance(type_.value_type, BasicType):
c_type = 'rosidl_generator_c__' + type_.value_type.typename.replace(' ', '_')
c_type = 'rosidl_runtime_c__' + type_.value_type.typename.replace(' ', '_')
else:
c_type = basetype_to_c(type_.value_type)
c_type += '__Sequence'
Expand All @@ -136,9 +136,9 @@ def basetype_to_c(basetype):
if isinstance(basetype, BasicType):
return BASIC_IDL_TYPES_TO_C[basetype.typename]
if isinstance(basetype, AbstractString):
return 'rosidl_generator_c__String'
return 'rosidl_runtime_c__String'
if isinstance(basetype, AbstractWString):
return 'rosidl_generator_c__U16String'
return 'rosidl_runtime_c__U16String'
if isinstance(basetype, NamespacedType):
return idl_structure_type_to_c_typename(basetype)
assert False, str(basetype)
Expand Down
Loading