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

add doc for array fields size and capacity #160

Merged
merged 1 commit into from
Aug 25, 2016
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
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
typedef struct rosidl_generator_c__ ## STRUCT_NAME ## __Array \
{ \
TYPE_NAME * data; \
size_t size; \
size_t capacity; \
size_t size; /*!< The number of valid items in data */ \
size_t capacity; /*!< The number of allocated items in data */ \
} rosidl_generator_c__ ## STRUCT_NAME ## __Array;

// array types for all primitive types
Expand Down
2 changes: 2 additions & 0 deletions rosidl_generator_c/resource/msg__struct.h.em
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,9 @@ typedef struct @(msg_typename)
typedef struct @(array_typename)
{
@(msg_typename) * data;
/// The number of valid items in data
size_t size;
/// The number of allocated items in data
size_t capacity;
} @(array_typename);

Expand Down