From 3152f4ac96dd8868e5302b88f3cb0bb9f8864041 Mon Sep 17 00:00:00 2001 From: Marijn Suijten Date: Tue, 11 May 2021 00:53:19 +0200 Subject: [PATCH] vk/platform_types: Mark SECURITY_ATTRIBUTES as a true ffi::c_void (#433) `()` is an empty tuple which can be constructed, while `ffi::c_void` cannot. This is only ever used as an opaque pointer anyway and not used by Ash; those wishing to access members directly should cast it to a struct representation of choice (`winapi`, `windows-rs` or something custom). Fixes #156 --- ash/src/vk/platform_types.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ash/src/vk/platform_types.rs b/ash/src/vk/platform_types.rs index ba4faf3ea..da98594fa 100644 --- a/ash/src/vk/platform_types.rs +++ b/ash/src/vk/platform_types.rs @@ -27,10 +27,8 @@ pub type zx_handle_t = u32; pub type _screen_context = c_void; #[allow(non_camel_case_types)] pub type _screen_window = c_void; -// FIXME: Platform specific types that should come from a library id:0 -// typedefs are only here so that the code compiles for now #[allow(non_camel_case_types)] -pub type SECURITY_ATTRIBUTES = (); +pub type SECURITY_ATTRIBUTES = c_void; // Opaque types pub type ANativeWindow = c_void; pub type AHardwareBuffer = c_void;