{"action":"created","issue":{"url":"https://api.github.com/repos/ros2/rosidl/issues/116","repository_url":"https://api.github.com/repos/ros2/rosidl","labels_url":"https://api.github.com/repos/ros2/rosidl/issues/116/labels{/name}","comments_url":"https://api.github.com/repos/ros2/rosidl/issues/116/comments","events_url":"https://api.github.com/repos/ros2/rosidl/issues/116/events","html_url":"https://github.com/ros2/rosidl/pull/116","id":148744109,"number":116,"title":"Avoid name conflict on field called 'message'","user":{"login":"gerkey","id":1188842,"avatar_url":"https://avatars.githubusercontent.com/u/1188842?v=3","gravatar_id":"","url":"https://api.github.com/users/gerkey","html_url":"https://github.com/gerkey","followers_url":"https://api.github.com/users/gerkey/followers","following_url":"https://api.github.com/users/gerkey/following{/other_user}","gists_url":"https://api.github.com/users/gerkey/gists{/gist_id}","starred_url":"https://api.github.com/users/gerkey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gerkey/subscriptions","organizations_url":"https://api.github.com/users/gerkey/orgs","repos_url":"https://api.github.com/users/gerkey/repos","events_url":"https://api.github.com/users/gerkey/events{/privacy}","received_events_url":"https://api.github.com/users/gerkey/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-04-15T19:09:46Z","updated_at":"2016-04-16T05:43:55Z","closed_at":"2016-04-16T00:26:04Z","pull_request":{"url":"https://api.github.com/repos/ros2/rosidl/pulls/116","html_url":"https://github.com/ros2/rosidl/pull/116","diff_url":"https://github.com/ros2/rosidl/pull/116.diff","patch_url":"https://github.com/ros2/rosidl/pull/116.patch"},"body":"Change pymessage to _pymessage to avoid possible conflict when a message defines a field called 'message'. Exposed by turning on `diagnostics_msgs` in ros2/common_interfaces#14. Without this change, you get a compile error on the generated code like so:\r\n\r\n~~~\r\n/home/gerkey/code/ros12-joy/build/diagnostics_msgs/rosidl_generator_py/diagnostics_msgs/msg/_diagnostic_status_s.c: In function ‘diagnostics_msgs_diagnostic_status__convert_to_py’:\r\n/home/gerkey/code/ros12-joy/build/diagnostics_msgs/rosidl_generator_py/diagnostics_msgs/msg/_diagnostic_status_s.c:94:14: error: redefinition of ‘pymessage’\r\n   PyObject * pymessage = NULL;\r\n              ^\r\n/home/gerkey/code/ros12-joy/build/diagnostics_msgs/rosidl_generator_py/diagnostics_msgs/msg/_diagnostic_status_s.c:75:13: note: previous definition of ‘pymessage’ was here\r\n   PyObject *pymessage = NULL;\r\n~~~"},"comment":{"url":"https://api.github.com/repos/ros2/rosidl/issues/comments/210741131","html_url":"https://github.com/ros2/rosidl/pull/116#issuecomment-210741131","issue_url":"https://api.github.com/repos/ros2/rosidl/issues/116","id":210741131,"user":{"login":"dirk-thomas","id":1335366,"avatar_url":"https://avatars.githubusercontent.com/u/1335366?v=3","gravatar_id":"","url":"https://api.github.com/users/dirk-thomas","html_url":"https://github.com/dirk-thomas","followers_url":"https://api.github.com/users/dirk-thomas/followers","following_url":"https://api.github.com/users/dirk-thomas/following{/other_user}","gists_url":"https://api.github.com/users/dirk-thomas/gists{/gist_id}","starred_url":"https://api.github.com/users/dirk-thomas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dirk-thomas/subscriptions","organizations_url":"https://api.github.com/users/dirk-thomas/orgs","repos_url":"https://api.github.com/users/dirk-thomas/repos","events_url":"https://api.github.com/users/dirk-thomas/events{/privacy}","received_events_url":"https://api.github.com/users/dirk-thomas/received_events","type":"User","site_admin":false},"created_at":"2016-04-16T05:43:55Z","updated_at":"2016-04-16T05:43:55Z","body":"There seem to be several other local variables which can potentially collide with field names. I think these templates need to ensure that no such collision is possible."}}