{"action":"created","issue":{"url":"https://api.github.com/repos/Sean1708/rusty-cheddar/issues/35","labels_url":"https://api.github.com/repos/Sean1708/rusty-cheddar/issues/35/labels{/name}","comments_url":"https://api.github.com/repos/Sean1708/rusty-cheddar/issues/35/comments","events_url":"https://api.github.com/repos/Sean1708/rusty-cheddar/issues/35/events","html_url":"https://github.com/Sean1708/rusty-cheddar/pull/35","id":129635258,"number":35,"title":"Namespace generated enum members with the name of the enum.","user":{"login":"kinetiknz","id":67343,"avatar_url":"https://avatars.githubusercontent.com/u/67343?v=3","gravatar_id":"","url":"https://api.github.com/users/kinetiknz","html_url":"https://github.com/kinetiknz","followers_url":"https://api.github.com/users/kinetiknz/followers","following_url":"https://api.github.com/users/kinetiknz/following{/other_user}","gists_url":"https://api.github.com/users/kinetiknz/gists{/gist_id}","starred_url":"https://api.github.com/users/kinetiknz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kinetiknz/subscriptions","organizations_url":"https://api.github.com/users/kinetiknz/orgs","repos_url":"https://api.github.com/users/kinetiknz/repos","events_url":"https://api.github.com/users/kinetiknz/events{/privacy}","received_events_url":"https://api.github.com/users/kinetiknz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-29T01:26:18Z","updated_at":"2016-01-29T09:02:39Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Sean1708/rusty-cheddar/pulls/35","html_url":"https://github.com/Sean1708/rusty-cheddar/pull/35","diff_url":"https://github.com/Sean1708/rusty-cheddar/pull/35.diff","patch_url":"https://github.com/Sean1708/rusty-cheddar/pull/35.patch"},"body":"Rust enum members are namespaced by the enum, whereas C enum members leak into the containing namespace.  This makes constructs such as:\r\n\r\n```\r\n#[repr(C)]\r\npub enum Foo {\r\n    WIN = 1,\r\n    LOSE = 2,\r\n}\r\n\r\n#[repr(C)]\r\npub enum Bar {\r\n    WIN = 3,\r\n    LOSE = 4,\r\n}\r\n```\r\n\r\n...ambiguous within C when they're valid in Rust.  The solution offered in this PR is to prefix the enum members with the enum's name to provide a form of namespacing.\r\n\r\nI'm not sure if you'd merge this as-is because it breaks compatibility with existing output"},"comment":{"url":"https://api.github.com/repos/Sean1708/rusty-cheddar/issues/comments/176651668","html_url":"https://github.com/Sean1708/rusty-cheddar/pull/35#issuecomment-176651668","issue_url":"https://api.github.com/repos/Sean1708/rusty-cheddar/issues/35","id":176651668,"user":{"login":"Sean1708","id":5058711,"avatar_url":"https://avatars.githubusercontent.com/u/5058711?v=3","gravatar_id":"","url":"https://api.github.com/users/Sean1708","html_url":"https://github.com/Sean1708","followers_url":"https://api.github.com/users/Sean1708/followers","following_url":"https://api.github.com/users/Sean1708/following{/other_user}","gists_url":"https://api.github.com/users/Sean1708/gists{/gist_id}","starred_url":"https://api.github.com/users/Sean1708/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sean1708/subscriptions","organizations_url":"https://api.github.com/users/Sean1708/orgs","repos_url":"https://api.github.com/users/Sean1708/repos","events_url":"https://api.github.com/users/Sean1708/events{/privacy}","received_events_url":"https://api.github.com/users/Sean1708/received_events","type":"User","site_admin":false},"created_at":"2016-01-29T09:02:39Z","updated_at":"2016-01-29T09:02:39Z","body":"Hi @kinetiknz, thanks for the PR. I'm working on a major refactor at the moment which will inevitably introduce some breaking changes, so it can be merged along with that."}}