(
log: extern "C" fn(*const u8, u32),
fb: FBShare<'a>,
calloc: extern "C" fn(usize, usize) -> *mut u8,
cdalloc: extern "C" fn(*mut u8, usize, usize),
input: &'a
| 23 | static mut none: Option<Box<()>> = None; |
| 24 | impl<'a> Context<'a> { |
| 25 | pub fn new( |
| 26 | log: extern "C" fn(*const u8, u32), |
| 27 | fb: FBShare<'a>, |
| 28 | calloc: extern "C" fn(usize, usize) -> *mut u8, |
| 29 | cdalloc: extern "C" fn(*mut u8, usize, usize), |
| 30 | input: &'a globals::Input, |
| 31 | ) -> Context<'a> { |
| 32 | let x = Context { |
| 33 | version: 1, |
| 34 | start_time: global_time_ms(), |
| 35 | log, |
| 36 | pid: 0, |
| 37 | fb, |
| 38 | calloc, |
| 39 | cdalloc, |
| 40 | store: unsafe { &mut none }, |
| 41 | input, |
| 42 | }; |
| 43 | |
| 44 | return x; |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | type FuncType = extern "C" fn(arg: &mut Context) -> i32; |
nothing calls this directly
no test coverage detected