{"action":"created","issue":{"url":"https://api.github.com/repos/Orc/discount/issues/113","labels_url":"https://api.github.com/repos/Orc/discount/issues/113/labels{/name}","comments_url":"https://api.github.com/repos/Orc/discount/issues/113/comments","events_url":"https://api.github.com/repos/Orc/discount/issues/113/events","html_url":"https://github.com/Orc/discount/issues/113","id":47524753,"number":113,"title":"Add support for using the library from C++","user":{"login":"lpapp","id":141957,"avatar_url":"https://avatars.githubusercontent.com/u/141957?v=3","gravatar_id":"","url":"https://api.github.com/users/lpapp","html_url":"https://github.com/lpapp","followers_url":"https://api.github.com/users/lpapp/followers","following_url":"https://api.github.com/users/lpapp/following{/other_user}","gists_url":"https://api.github.com/users/lpapp/gists{/gist_id}","starred_url":"https://api.github.com/users/lpapp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lpapp/subscriptions","organizations_url":"https://api.github.com/users/lpapp/orgs","repos_url":"https://api.github.com/users/lpapp/repos","events_url":"https://api.github.com/users/lpapp/events{/privacy}","received_events_url":"https://api.github.com/users/lpapp/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2014-11-02T02:25:56Z","updated_at":"2015-07-12T01:20:03Z","closed_at":null,"body":"The code seems to have been designed with C in mind, but with a little extra effort, the general old 'extern \"C\"' practice could be applied in the library to make it usable in a C++ project off-hand."},"comment":{"url":"https://api.github.com/repos/Orc/discount/issues/comments/120676301","html_url":"https://github.com/Orc/discount/issues/113#issuecomment-120676301","issue_url":"https://api.github.com/repos/Orc/discount/issues/113","id":120676301,"user":{"login":"binki","id":82626,"avatar_url":"https://avatars.githubusercontent.com/u/82626?v=3","gravatar_id":"","url":"https://api.github.com/users/binki","html_url":"https://github.com/binki","followers_url":"https://api.github.com/users/binki/followers","following_url":"https://api.github.com/users/binki/following{/other_user}","gists_url":"https://api.github.com/users/binki/gists{/gist_id}","starred_url":"https://api.github.com/users/binki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/binki/subscriptions","organizations_url":"https://api.github.com/users/binki/orgs","repos_url":"https://api.github.com/users/binki/repos","events_url":"https://api.github.com/users/binki/events{/privacy}","received_events_url":"https://api.github.com/users/binki/received_events","type":"User","site_admin":false},"created_at":"2015-07-12T01:20:03Z","updated_at":"2015-07-12T01:20:03Z","body":"IMO, discount is a C API. It’s the responsibility of C++ developers to wrap inclusions of a C API’s headers in\r\n\r\n    extern \"C\" {\r\n    #include <mkdio.h>\r\n    }\r\n\r\nIt should not be the responsibility of the C library. It’s a C library after all, not a C++ library…\r\n\r\nBut, it would probably be useful if someone created a C++ wrapper around `MMIOT *` that provided RAII behavior. Then the README could just refer C++ users to that wrapper and avoid creation of issues like this one perhaps?"}}