Skip to content

Commit

Permalink
Mark accessing extern statics as unsafe.
Browse files Browse the repository at this point in the history
This is required now due to rust-lang/rust#36247.
  • Loading branch information
SSheldon committed Jan 8, 2017
1 parent 9ac99d2 commit 2fe01bb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ffi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,11 @@ extern {
}

pub fn dispatch_get_main_queue() -> dispatch_queue_t {
&_dispatch_main_q as *const _ as dispatch_queue_t
unsafe { &_dispatch_main_q as *const _ as dispatch_queue_t }
}

pub const DISPATCH_QUEUE_SERIAL: dispatch_queue_attr_t = 0 as dispatch_queue_attr_t;
pub static DISPATCH_QUEUE_CONCURRENT: &'static dispatch_object_s = &_dispatch_queue_attr_concurrent;
pub static DISPATCH_QUEUE_CONCURRENT: &'static dispatch_object_s = unsafe { &_dispatch_queue_attr_concurrent };

pub const DISPATCH_QUEUE_PRIORITY_HIGH: c_long = 2;
pub const DISPATCH_QUEUE_PRIORITY_DEFAULT: c_long = 0;
Expand Down

0 comments on commit 2fe01bb

Please sign in to comment.