Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/core_graphics/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

#![cfg(feature = "core_graphics")]

#[link(name = "CoreGraphics", kind = "framework")]
#[cfg_attr(target_vendor = "apple", link(name = "CoreGraphics", kind = "framework"))]
#[cfg_attr(not(target_vendor = "apple"), link(name = "CoreGraphics"))]
extern "C" {}

mod geometry;
Expand Down
3 changes: 2 additions & 1 deletion src/foundation/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,6 @@ pub type NSTimeInterval = f64;
#[allow(non_upper_case_globals)]
pub const NSNotFound: crate::objc::NSInteger = crate::objc::NSIntegerMax;

#[link(name = "Foundation", kind = "framework")]
#[cfg_attr(target_vendor = "apple", link(name = "Foundation", kind = "framework"))]
#[cfg_attr(not(target_vendor = "apple"), link(name = "Foundation"))]
extern "C" {}
2 changes: 2 additions & 0 deletions src/foundation/ns_number.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,15 @@ impl From<c_uint> for Arc<NSNumber> {
}
}

#[cfg(not(windows))] // On windows, c_long and c_int are the same type.
impl From<c_long> for Arc<NSNumber> {
#[inline]
fn from(value: c_long) -> Self {
NSNumber::from_long(value)
}
}

#[cfg(not(windows))] // On windows, c_ulong and c_uint are the same type.
impl From<c_ulong> for Arc<NSNumber> {
#[inline]
fn from(value: c_ulong) -> Self {
Expand Down