Skip to content

Commit

Permalink
Add a Class type to fix the improper_ctypes warning.
Browse files Browse the repository at this point in the history
This warning starting appearing from rust-lang/rust#26583.
  • Loading branch information
SSheldon committed Oct 6, 2015
1 parent bd10ada commit a1c5ef6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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<A, R> {
isa: *const (),
isa: *const Class,
flags: c_int,
_reserved: c_int,
invoke: unsafe extern fn(*mut Block<A, R>, ...) -> R,
Expand Down

0 comments on commit a1c5ef6

Please sign in to comment.