Skip to content

Commit

Permalink
Make sure to use PyTuple_SET_ITEM where appropriate.
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
  • Loading branch information
clalancette committed Dec 6, 2018
1 parent 2fc1fdc commit dc8edb3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rclpy/src/rclpy/_rclpy.c
Original file line number Diff line number Diff line change
Expand Up @@ -2984,7 +2984,7 @@ __convert_names_and_types(
if (!pytuple) {
return false;
}
PyList_SET_ITEM(
PyTuple_SET_ITEM(
pytuple, 0,
PyUnicode_FromString(topic_names_and_types.names.data[i]));
PyObject * types_list = PyList_New(topic_names_and_types.types[i].size);
Expand All @@ -2998,7 +2998,7 @@ __convert_names_and_types(
types_list, j,
PyUnicode_FromString(topic_names_and_types.types[i].data[j]));
}
PyList_SET_ITEM(
PyTuple_SET_ITEM(
pytuple, 1,
types_list);
PyList_SET_ITEM(
Expand Down

0 comments on commit dc8edb3

Please sign in to comment.