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
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::cell::UnsafeCell;
use core::ffi::*;
use core::marker::{PhantomData, PhantomPinned};
#[cfg(feature = "objc2")]
use objc2::__framework_prelude::*;
use crate::*;
extern "C-unwind" {
/// # Safety
///
/// `obj` must be a valid pointer.
pub fn sec_retain(obj: *mut c_void) -> *mut c_void;
}
extern "C-unwind" {
/// # Safety
///
/// `obj` must be a valid pointer.
pub fn sec_release(obj: *mut c_void);
}
/// A `sec_object` is a generic, ARC-able type wrapper for common CoreFoundation Security types.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/security/sec_object?language=objc)
#[repr(C)]
#[derive(Debug)]
pub struct sec_object {
inner: [u8; 0],
_p: UnsafeCell<PhantomData<(*const UnsafeCell<()>, PhantomPinned)>>,
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for sec_object {
const ENCODING_REF: Encoding = Encoding::Pointer(&Encoding::Struct("sec_object", &[]));
}
/// A `sec_object` is a generic, ARC-able type wrapper for common CoreFoundation Security types.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/security/sec_object_t?language=objc)
pub type sec_object_t = *mut sec_object;