~jojo/Carth

ref: 2d5e5be3b7e0ce88608095cd809ea805435a7658 Carth/foreign-core/src/ffi.rs -rw-r--r-- 458 bytes
2d5e5be3JoJo Less desugaring in Parse (do in Infer instead), more concrete Parsed. 7 months 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);