~jojo/Carth

ref: c5a394b01aa60cb95605d66f6118cfb231955aa7 Carth/std-rs/src/ffi.rs -rw-r--r-- 458 bytes
c5a394b0JoJo Fix class constraint inference bug when explicit scheme given 1 year, 6 days ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
use libc::*;

#[link(name = "sigsegv")]
extern "C" {
    pub fn stackoverflow_install_handler(
        handler: stackoverflow_handler_t,
        extra_stack: *mut c_void,
        extra_stack_size: usize,
    ) -> c_int;
}

#[link(name = "gc")]
extern "C" {
    pub fn GC_malloc(size: size_t) -> *mut c_void;
}

pub type stackoverflow_context_t = *mut c_void;

pub type stackoverflow_handler_t = extern "C" fn(emergency: c_int, scp: stackoverflow_context_t);