1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use objc2::__framework_prelude::*;
use crate::*;
extern "C" {
/// ************** General ***************
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/foundation/nsdebugenabled?language=objc)
pub static NSDebugEnabled: Bool;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nszombieenabled?language=objc)
pub static NSZombieEnabled: Bool;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsdeallocatezombies?language=objc)
pub static NSDeallocateZombies: Bool;
}
/// # Safety
///
/// - `an_object` should be of the correct type.
/// - `an_object` might not allow `None`.
#[inline]
pub unsafe extern "C-unwind" fn NSIsFreedObject(an_object: Option<&AnyObject>) -> bool {
extern "C-unwind" {
fn NSIsFreedObject(an_object: Option<&AnyObject>) -> Bool;
}
unsafe { NSIsFreedObject(an_object) }.as_bool()
}
/// ************** Stack processing ***************
#[inline]
pub extern "C-unwind" fn NSFrameAddress(frame: NSUInteger) -> *mut c_void {
extern "C-unwind" {
fn NSFrameAddress(frame: NSUInteger) -> *mut c_void;
}
unsafe { NSFrameAddress(frame) }
}
#[inline]
pub extern "C-unwind" fn NSReturnAddress(frame: NSUInteger) -> *mut c_void {
extern "C-unwind" {
fn NSReturnAddress(frame: NSUInteger) -> *mut c_void;
}
unsafe { NSReturnAddress(frame) }
}
#[inline]
pub extern "C-unwind" fn NSCountFrames() -> NSUInteger {
extern "C-unwind" {
fn NSCountFrames() -> NSUInteger;
}
unsafe { NSCountFrames() }
}
/// NSAutoreleasePoolDebugging.
#[cfg(feature = "NSAutoreleasePool")]
impl NSAutoreleasePool {
extern_methods!(
#[unsafe(method(showPools))]
#[unsafe(method_family = none)]
pub unsafe fn showPools();
);
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nskeepallocationstatistics?language=objc)
pub static NSKeepAllocationStatistics: Bool;
}
extern "C-unwind" {
/// # Safety
///
/// - `object` should be of the correct type.
/// - `object` might not allow `None`.
pub fn NSRecordAllocationEvent(event_type: c_int, object: Option<&AnyObject>);
}