{"action":"created","issue":{"url":"https://api.github.com/repos/KhronosGroup/Vulkan-Docs/issues/295","repository_url":"https://api.github.com/repos/KhronosGroup/Vulkan-Docs","labels_url":"https://api.github.com/repos/KhronosGroup/Vulkan-Docs/issues/295/labels{/name}","comments_url":"https://api.github.com/repos/KhronosGroup/Vulkan-Docs/issues/295/comments","events_url":"https://api.github.com/repos/KhronosGroup/Vulkan-Docs/issues/295/events","html_url":"https://github.com/KhronosGroup/Vulkan-Docs/issues/295","id":166422413,"number":295,"title":"xcb_connection_t* constant when passed to a command?","user":{"login":"Mervill","id":6798456,"avatar_url":"https://avatars.githubusercontent.com/u/6798456?v=3","gravatar_id":"","url":"https://api.github.com/users/Mervill","html_url":"https://github.com/Mervill","followers_url":"https://api.github.com/users/Mervill/followers","following_url":"https://api.github.com/users/Mervill/following{/other_user}","gists_url":"https://api.github.com/users/Mervill/gists{/gist_id}","starred_url":"https://api.github.com/users/Mervill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mervill/subscriptions","organizations_url":"https://api.github.com/users/Mervill/orgs","repos_url":"https://api.github.com/users/Mervill/repos","events_url":"https://api.github.com/users/Mervill/events{/privacy}","received_events_url":"https://api.github.com/users/Mervill/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/KhronosGroup/Vulkan-Docs/labels/Registry","name":"Registry","color":"d19fe3"},{"url":"https://api.github.com/repos/KhronosGroup/Vulkan-Docs/labels/Resolving%20Inside%20Khronos","name":"Resolving Inside Khronos","color":"ed458b"},{"url":"https://api.github.com/repos/KhronosGroup/Vulkan-Docs/labels/WSI","name":"WSI","color":"6f6cb9"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-07-19T20:02:56Z","updated_at":"2016-08-02T23:30:12Z","closed_at":null,"body":"Shouldn't `xcb_connection_t*` here be `const`?\r\n```xml\r\n<command>\r\n<proto><type>VkBool32</type> <name>vkGetPhysicalDeviceXcbPresentationSupportKHR</name></proto>\r\n<param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>\r\n<param><type>uint32_t</type> <name>queueFamilyIndex</name></param>\r\n<param><type>xcb_connection_t</type>* <name>connection</name></param>\r\n<param><type>xcb_visualid_t</type> <name>visual_id</name></param>\r\n</command>\r\n```\r\n```xml\r\n<param>const <type>xcb_connection_t</type>* <name>connection</name></param>\r\n```\r\n\r\nContext: I'm writing C# bindings for Vulkan. The binding generator I've written assumes that non-constant pointers represent objects that should be returned to the caller, since the lack of `const` suggests that the value will be mutated.\r\n\r\nThe same issue might exist for `wl_display*` in `vkGetPhysicalDeviceWaylandPresentationSupportKHR`\r\n\r\n```xml\r\n<command>\r\n<proto><type>VkBool32</type> <name>vkGetPhysicalDeviceWaylandPresentationSupportKHR</name></proto>\r\n<param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>\r\n<param><type>uint32_t</type> <name>queueFamilyIndex</name></param>\r\n<param>struct <type>wl_display</type>* <name>display</name></param>\r\n</command>\r\n```\r\n```xml\r\n<param>const struct <type>wl_display</type>* <name>display</name></param>\r\n```\r\n\r\nAnd also for `MirConnection*` in `vkGetPhysicalDeviceMirPresentationSupportKHR`\r\n\r\n```xml\r\n<command>\r\n<proto><type>VkBool32</type> <name>vkGetPhysicalDeviceMirPresentationSupportKHR</name></proto>\r\n<param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>\r\n<param><type>uint32_t</type> <name>queueFamilyIndex</name></param>\r\n<param><type>MirConnection</type>* <name>connection</name></param>\r\n</command>\r\n```\r\n```xml\r\n<param>const <type>MirConnection</type>* <name>connection</name></param>\r\n```"},"comment":{"url":"https://api.github.com/repos/KhronosGroup/Vulkan-Docs/issues/comments/237081594","html_url":"https://github.com/KhronosGroup/Vulkan-Docs/issues/295#issuecomment-237081594","issue_url":"https://api.github.com/repos/KhronosGroup/Vulkan-Docs/issues/295","id":237081594,"user":{"login":"oddhack","id":4693344,"avatar_url":"https://avatars.githubusercontent.com/u/4693344?v=3","gravatar_id":"","url":"https://api.github.com/users/oddhack","html_url":"https://github.com/oddhack","followers_url":"https://api.github.com/users/oddhack/followers","following_url":"https://api.github.com/users/oddhack/following{/other_user}","gists_url":"https://api.github.com/users/oddhack/gists{/gist_id}","starred_url":"https://api.github.com/users/oddhack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oddhack/subscriptions","organizations_url":"https://api.github.com/users/oddhack/orgs","repos_url":"https://api.github.com/users/oddhack/repos","events_url":"https://api.github.com/users/oddhack/events{/privacy}","received_events_url":"https://api.github.com/users/oddhack/received_events","type":"User","site_admin":false},"created_at":"2016-08-02T23:30:12Z","updated_at":"2016-08-02T23:30:12Z","body":"@Mervill (speaking as someone unfamiliar with C#) does it make a difference to the C# interface whether a pointer parameter is used as \"out\" vs \"in/out\" (modified in place)? What would you want to do differently in those cases, if so? There's no way to express that distinction in C AFAIK.."}}
{"actor":{"display_login":"oddhack"}}