From a1c5ef60555ef46c4be7fc7df3d027296d1ecd7a Mon Sep 17 00:00:00 2001 From: Steven Sheldon Date: Mon, 5 Oct 2015 21:47:49 -0500 Subject: [PATCH] Add a Class type to fix the improper_ctypes warning. This warning starting appearing from rust-lang/rust#26583. --- src/lib.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 0b14880..3f2d444 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -56,9 +56,11 @@ use std::ops::{Deref, DerefMut}; use std::ptr; use libc::{c_int, c_ulong, c_void}; +enum Class { } + #[link(name = "System", kind = "dylib")] extern { - static _NSConcreteStackBlock: (); + static _NSConcreteStackBlock: Class; fn _Block_copy(block: *const c_void) -> *mut c_void; fn _Block_release(block: *const c_void); @@ -104,7 +106,7 @@ block_args_impl!(a: A, b: B, c: C, d: D, e: E, f: F, g: G, h: H, i: I, j: J, k: #[repr(C)] struct BlockBase { - isa: *const (), + isa: *const Class, flags: c_int, _reserved: c_int, invoke: unsafe extern fn(*mut Block, ...) -> R,