Skip to content

Commit d3a5c5e

Browse files
committed
Rename message_bounds structure for consistency
Based on feedback from API review. Signed-off-by: Michael Carroll <[email protected]>
1 parent 4f75c92 commit d3a5c5e

File tree

4 files changed

+24
-24
lines changed

4 files changed

+24
-24
lines changed

rosidl_runtime_c/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ find_package(ament_cmake_ros REQUIRED)
1515
find_package(rosidl_typesupport_interface REQUIRED)
1616

1717
add_library(${PROJECT_NAME}
18-
"src/message_bounds.c"
1918
"src/message_type_support.c"
2019
"src/primitives_sequence_functions.c"
20+
"src/sequence_bound.c"
2121
"src/service_type_support.c"
2222
"src/string_functions.c"
2323
"src/u16string_functions.c"

rosidl_runtime_c/include/rosidl_runtime_c/message_bounds_struct.h renamed to rosidl_runtime_c/include/rosidl_runtime_c/sequence_bound.h

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#ifndef ROSIDL_RUNTIME_C__MESSAGE_BOUNDS_STRUCT_H_
16-
#define ROSIDL_RUNTIME_C__MESSAGE_BOUNDS_STRUCT_H_
15+
#ifndef ROSIDL_RUNTIME_C__SEQUENCE_BOUND_H_
16+
#define ROSIDL_RUNTIME_C__SEQUENCE_BOUND_H_
1717

1818
#include "rosidl_runtime_c/visibility_control.h"
1919
#include "rosidl_typesupport_interface/macros.h"
@@ -23,32 +23,32 @@ extern "C"
2323
{
2424
#endif
2525

26-
typedef struct rosidl_message_bounds_t rosidl_message_bounds_t;
26+
typedef struct rosidl_runtime_c__Sequence__bound rosidl_runtime_c__Sequence__bound;
2727

28-
typedef const rosidl_message_bounds_t * (* rosidl_message_bounds_handle_function)(
29-
const rosidl_message_bounds_t *, const char *);
28+
typedef const rosidl_runtime_c__Sequence__bound * (* rosidl_runtime_c__bound_handle_function)(
29+
const rosidl_runtime_c__Sequence__bound *, const char *);
3030

31-
struct rosidl_message_bounds_t
31+
struct rosidl_runtime_c__Sequence__bound
3232
{
3333
const char * typesupport_identifier;
3434
const void * data;
35-
rosidl_message_bounds_handle_function func;
35+
rosidl_runtime_c__bound_handle_function func;
3636
};
3737

3838
ROSIDL_GENERATOR_C_PUBLIC
39-
const rosidl_message_bounds_t * get_message_bounds_handle(
40-
const rosidl_message_bounds_t * handle, const char * identifier);
39+
const rosidl_runtime_c__Sequence__bound * get_sequence_bound_handle(
40+
const rosidl_runtime_c__Sequence__bound * handle, const char * identifier);
4141

4242
ROSIDL_GENERATOR_C_PUBLIC
43-
const rosidl_message_bounds_t * get_message_bounds_handle_function(
44-
const rosidl_message_bounds_t * handle, const char * identifier);
43+
const rosidl_runtime_c__Sequence__bound * get_sequence_bound_handle_function(
44+
const rosidl_runtime_c__Sequence__bound * handle, const char * identifier);
4545

46-
#define ROSIDL_GET_MSG_BOUNDS(PkgName, MsgSubfolder, MsgName) \
46+
#define ROSIDL_GET_SEQUENCE_BOUNDS(PkgName, MsgSubfolder, MsgName) \
4747
ROSIDL_BOUNDS_INTERFACE__MESSAGE_SYMBOL_NAME( \
4848
rosidl_typesupport_c, PkgName, MsgSubfolder, MsgName)()
4949

5050
#ifdef __cplusplus
5151
}
5252
#endif
5353

54-
#endif // ROSIDL_RUNTIME_C__MESSAGE_BOUNDS_STRUCT_H_
54+
#endif // ROSIDL_RUNTIME_C__SEQUENCE_BOUND_H_

rosidl_runtime_c/include/rosidl_runtime_c/string_bound.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#ifndef ROSIDL_RUNTIME_C__STRING_BOUNDS_H_
16-
#define ROSIDL_RUNTIME_C__STRING_BOUNDS_H_
15+
#ifndef ROSIDL_RUNTIME_C__STRING_BOUND_H_
16+
#define ROSIDL_RUNTIME_C__STRING_BOUND_H_
1717

1818
#include <stddef.h>
1919

@@ -24,4 +24,4 @@ typedef struct rosidl_runtime_c__String__bound
2424
size_t bound;
2525
} rosidl_runtime_c__String__bound;
2626

27-
#endif // ROSIDL_RUNTIME_C__STRING_BOUNDS_H_
27+
#endif // ROSIDL_RUNTIME_C__STRING_BOUND_H_

rosidl_runtime_c/src/message_bounds.c renamed to rosidl_runtime_c/src/sequence_bound.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,23 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#include "rosidl_runtime_c/message_bounds_struct.h"
15+
#include "rosidl_runtime_c/sequence_bound.h"
1616

1717
#include <assert.h>
1818
#include <string.h>
1919

20-
const rosidl_message_bounds_t * get_message_bounds_handle(
21-
const rosidl_message_bounds_t * handle, const char * identifier)
20+
const rosidl_runtime_c__Sequence__bound * get_sequence_bound_handle(
21+
const rosidl_runtime_c__Sequence__bound * handle, const char * identifier)
2222
{
2323
assert(handle);
2424
assert(handle->func);
25-
rosidl_message_bounds_handle_function func =
26-
(rosidl_message_bounds_handle_function)(handle->func);
25+
rosidl_runtime_c__bound_handle_function func =
26+
(rosidl_runtime_c__bound_handle_function)(handle->func);
2727
return func(handle, identifier);
2828
}
2929

30-
const rosidl_message_bounds_t * get_message_bound_handle_function(
31-
const rosidl_message_bounds_t * handle, const char * identifier)
30+
const rosidl_runtime_c__Sequence__bound * get_sequence_bound_handle_function(
31+
const rosidl_runtime_c__Sequence__bound * handle, const char * identifier)
3232
{
3333
assert(handle);
3434
assert(handle->typesupport_identifier);

0 commit comments

Comments
 (0)