Skip to content

Commit a1c5ef6

Browse files
committed
Add a Class type to fix the improper_ctypes warning.
This warning starting appearing from rust-lang/rust#26583.
1 parent bd10ada commit a1c5ef6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/lib.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,11 @@ use std::ops::{Deref, DerefMut};
5656
use std::ptr;
5757
use libc::{c_int, c_ulong, c_void};
5858

59+
enum Class { }
60+
5961
#[link(name = "System", kind = "dylib")]
6062
extern {
61-
static _NSConcreteStackBlock: ();
63+
static _NSConcreteStackBlock: Class;
6264

6365
fn _Block_copy(block: *const c_void) -> *mut c_void;
6466
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:
104106

105107
#[repr(C)]
106108
struct BlockBase<A, R> {
107-
isa: *const (),
109+
isa: *const Class,
108110
flags: c_int,
109111
_reserved: c_int,
110112
invoke: unsafe extern fn(*mut Block<A, R>, ...) -> R,

0 commit comments

Comments
 (0)