{"action":"created","issue":{"url":"https://api.github.com/repos/LLNL/GOTCHA/issues/42","repository_url":"https://api.github.com/repos/LLNL/GOTCHA","labels_url":"https://api.github.com/repos/LLNL/GOTCHA/issues/42/labels{/name}","comments_url":"https://api.github.com/repos/LLNL/GOTCHA/issues/42/comments","events_url":"https://api.github.com/repos/LLNL/GOTCHA/issues/42/events","html_url":"https://github.com/LLNL/GOTCHA/pull/42","id":256060863,"number":42,"title":"[RFC] Moderate intermediate interface change","user":{"login":"DavidPoliakoff","id":4220361,"avatar_url":"https://avatars2.githubusercontent.com/u/4220361?v=4","gravatar_id":"","url":"https://api.github.com/users/DavidPoliakoff","html_url":"https://github.com/DavidPoliakoff","followers_url":"https://api.github.com/users/DavidPoliakoff/followers","following_url":"https://api.github.com/users/DavidPoliakoff/following{/other_user}","gists_url":"https://api.github.com/users/DavidPoliakoff/gists{/gist_id}","starred_url":"https://api.github.com/users/DavidPoliakoff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DavidPoliakoff/subscriptions","organizations_url":"https://api.github.com/users/DavidPoliakoff/orgs","repos_url":"https://api.github.com/users/DavidPoliakoff/repos","events_url":"https://api.github.com/users/DavidPoliakoff/events{/privacy}","received_events_url":"https://api.github.com/users/DavidPoliakoff/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-09-07T20:29:14Z","updated_at":"2017-09-07T20:50:25Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/LLNL/GOTCHA/pulls/42","html_url":"https://github.com/LLNL/GOTCHA/pull/42","diff_url":"https://github.com/LLNL/GOTCHA/pull/42.diff","patch_url":"https://github.com/LLNL/GOTCHA/pull/42.patch"},"body":"@mplegendre : I realized that at the end of the day, the user-facing side of the interface will need to have one change: the way in which a user \"asks for\" the underlying function pointer. My idea here is to propose that we start socializing that, I imagine whatever implementation we wind up with will have to honor essentially this contract, just with varying meanings of \"wrapper_id_t\" and \"gotcha_get_wrapped_function.\" If you are okay with this idea, before merging I'll update our examples to match this.\r\n\r\nThe problem (I know about):\r\n\r\nBefore, you would do something like\r\n\r\n\r\n```\r\nint (*my_wrappee)();\r\n\r\nint my_wrapper(){ return my_wrappee() + 5;}\r\n\r\nstruct gotcha_binding_t gotcha_actions[] = {\r\n  {\"wrap_this\",my_wrapper,(void**)&my_wrappee} //optional casting\r\n};\r\n```\r\n\r\nThe new interface is going to be much uglier, as \"my_wrappee\" isn't the actual function pointer, you'll need something like\r\n\r\n```\r\nwrapper_id_t my_wrappee_index;\r\nint my_wrapper(){\r\n   return (int(*)())gotcha_get_wrapped_function(my_wrappee_index) + 5;\r\n}\r\n```\r\n\r\nWhich I think is just a fact of life, but it is ugly as user-facing code can be.\r\n\r\nThoughts?"},"comment":{"url":"https://api.github.com/repos/LLNL/GOTCHA/issues/comments/327923839","html_url":"https://github.com/LLNL/GOTCHA/pull/42#issuecomment-327923839","issue_url":"https://api.github.com/repos/LLNL/GOTCHA/issues/42","id":327923839,"user":{"login":"DavidPoliakoff","id":4220361,"avatar_url":"https://avatars2.githubusercontent.com/u/4220361?v=4","gravatar_id":"","url":"https://api.github.com/users/DavidPoliakoff","html_url":"https://github.com/DavidPoliakoff","followers_url":"https://api.github.com/users/DavidPoliakoff/followers","following_url":"https://api.github.com/users/DavidPoliakoff/following{/other_user}","gists_url":"https://api.github.com/users/DavidPoliakoff/gists{/gist_id}","starred_url":"https://api.github.com/users/DavidPoliakoff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DavidPoliakoff/subscriptions","organizations_url":"https://api.github.com/users/DavidPoliakoff/orgs","repos_url":"https://api.github.com/users/DavidPoliakoff/repos","events_url":"https://api.github.com/users/DavidPoliakoff/events{/privacy}","received_events_url":"https://api.github.com/users/DavidPoliakoff/received_events","type":"User","site_admin":false},"created_at":"2017-09-07T20:50:25Z","updated_at":"2017-09-07T20:50:25Z","author_association":"MEMBER","body":"I agree on the varargs macro, to the extent that I have the [building blocks for it ](https://github.com/LLNL/GOTCHA/blob/develop/include/gotcha/gotcha.h#L51). Let me futz around with it for a bit before making any final comments.\r\n\r\nI'll also update to match the naming scheme, we _really_ don't want to confuse the users with that, good catch\r\n\r\n"}}
{"actor":{"display_login":"DavidPoliakoff"}}