{"action":"created","issue":{"url":"https://api.github.com/repos/ParticlePeter/Erupted-V2/issues/3","repository_url":"https://api.github.com/repos/ParticlePeter/Erupted-V2","labels_url":"https://api.github.com/repos/ParticlePeter/Erupted-V2/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/ParticlePeter/Erupted-V2/issues/3/comments","events_url":"https://api.github.com/repos/ParticlePeter/Erupted-V2/issues/3/events","html_url":"https://github.com/ParticlePeter/Erupted-V2/issues/3","id":308708605,"number":3,"title":"Callbacks should be `extern(C)`","user":{"login":"ohdatboi","id":27865436,"avatar_url":"https://avatars3.githubusercontent.com/u/27865436?v=4","gravatar_id":"","url":"https://api.github.com/users/ohdatboi","html_url":"https://github.com/ohdatboi","followers_url":"https://api.github.com/users/ohdatboi/followers","following_url":"https://api.github.com/users/ohdatboi/following{/other_user}","gists_url":"https://api.github.com/users/ohdatboi/gists{/gist_id}","starred_url":"https://api.github.com/users/ohdatboi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ohdatboi/subscriptions","organizations_url":"https://api.github.com/users/ohdatboi/orgs","repos_url":"https://api.github.com/users/ohdatboi/repos","events_url":"https://api.github.com/users/ohdatboi/events{/privacy}","received_events_url":"https://api.github.com/users/ohdatboi/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-03-26T19:42:01Z","updated_at":"2018-03-27T16:29:33Z","closed_at":"2018-03-27T16:29:33Z","author_association":"NONE","body":"(This is the problem I have with erupted-v1, but I decided to post it here).\r\n\r\nI was having a problem with VK_EXT_debug_report extension when *nothing* was passed to my callback (Everything is 0 and pointers point to 0x1).\r\n\r\nAfter digging deeper and trying to mark `PFN_vkDebugReportCallbackEXT`  as a `extern(C)` it worked. So shouldn't other callbacks be marked `extern(C)` as well?\r\n\r\nAlso, removing `@nogc` attribute worked too meaning that I can use non-nogc code in my callbacks. I'm not sure how safe it is (both memory-safe and thread-safe), but it works flawlessly for me.\r\n\r\nQuestion is: add `extern(C)` for callbacks and remove `@nogc`?"},"comment":{"url":"https://api.github.com/repos/ParticlePeter/Erupted-V2/issues/comments/376589166","html_url":"https://github.com/ParticlePeter/Erupted-V2/issues/3#issuecomment-376589166","issue_url":"https://api.github.com/repos/ParticlePeter/Erupted-V2/issues/3","id":376589166,"user":{"login":"ohdatboi","id":27865436,"avatar_url":"https://avatars3.githubusercontent.com/u/27865436?v=4","gravatar_id":"","url":"https://api.github.com/users/ohdatboi","html_url":"https://github.com/ohdatboi","followers_url":"https://api.github.com/users/ohdatboi/followers","following_url":"https://api.github.com/users/ohdatboi/following{/other_user}","gists_url":"https://api.github.com/users/ohdatboi/gists{/gist_id}","starred_url":"https://api.github.com/users/ohdatboi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ohdatboi/subscriptions","organizations_url":"https://api.github.com/users/ohdatboi/orgs","repos_url":"https://api.github.com/users/ohdatboi/repos","events_url":"https://api.github.com/users/ohdatboi/events{/privacy}","received_events_url":"https://api.github.com/users/ohdatboi/received_events","type":"User","site_admin":false},"created_at":"2018-03-27T16:29:33Z","updated_at":"2018-03-27T16:29:33Z","author_association":"NONE","body":"@ParticlePeter Thanks! Indeed, I didn't noticed `extern(System)` because I moved `PFN_vkDebugReportCallbackEXT` to the top of the module so I could mark it as non-`@nogc`.\r\n\r\nI understand why these callbacks are marked as `@nogc`, maybe in the future it would be possible to do something about it (i.e. if user's code is marked as `@nogc` then erupted functions are `@nogc` too, but when user's code uses GC, erupted functions are non-`@nogc` as well)\r\n\r\nAnyway, thanks for the help, I'll stick with my own fork (which just moves this one `PFN_vkDebugReportCallbackEXT` to the top of the module and marks it as `nothrow extern(C)`."}}
{"actor":{"display_login":"ohdatboi"}}