Skip to content

Commit

Permalink
sys: Fix a few mistakes
Browse files Browse the repository at this point in the history
  • Loading branch information
madsmtm committed Sep 6, 2021
1 parent 216b1b4 commit e3d3257
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
1 change: 0 additions & 1 deletion objc/src/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ use std::os::raw::c_uint;
use crate::Encode;

use objc_sys;
#[cfg(target_vendor = "apple")]
#[allow(deprecated)]
pub use objc_sys::object_dispose;
pub use objc_sys::{
Expand Down
1 change: 0 additions & 1 deletion objc_sys/src/object.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ extern "C" {
#[cfg(apple)]
pub fn object_copy(obj: *const objc_object, size: usize) -> *mut objc_object;
#[deprecated = "Not needed since ARC"]
#[cfg(apple)]
pub fn object_dispose(obj: *mut objc_object) -> *mut objc_object;
#[deprecated = "Not needed since ARC"]
pub fn object_setInstanceVariable(
Expand Down
8 changes: 5 additions & 3 deletions objc_sys/src/various.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,12 @@ extern "C" {
#[cfg(apple)]
pub fn objc_copyImageNames(out_len: *mut c_uint) -> *mut *const c_char;

// Instead of being able to change this, it's a weak symbol on GNUStep.
#[cfg(apple)]
pub fn objc_enumerationMutation(obj: *mut objc_object);
#[cfg(apple)]
pub fn objc_setEnumerationMutationHandler(
handler: Option<unsafe extern "C" fn(arg1: *mut objc_object)>,
handler: Option<unsafe extern "C" fn(obj: *mut objc_object)>,
);

pub fn objc_getAssociatedObject(
Expand All @@ -70,9 +71,10 @@ extern "C" {

#[cfg(apple)]
pub fn objc_setForwardHandler(fwd: *mut c_void, fwd_stret: *mut c_void);
#[cfg(apple)]
// These two are defined in:
// - Apple: objc-sync.h
// - GNUStep: dtable.h / associate.m
pub fn objc_sync_enter(obj: *mut objc_object) -> c_int;
#[cfg(apple)]
pub fn objc_sync_exit(obj: *mut objc_object) -> c_int;

/// Not available on macOS x86.
Expand Down

0 comments on commit e3d3257

Please sign in to comment.