1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
use std::os::raw::c_void; #[repr(C)] #[derive(Copy, Clone)] pub struct Closure { entry_pointer: *const c_void, arity: usize, } impl Closure { pub const fn new(entry_pointer: *const c_void, arity: usize) -> Self { Self { entry_pointer, arity, } } } unsafe impl Sync for Closure {}