mod incomplete_array;
use core::ffi::{c_char, c_int, c_uint, c_void};
pub use incomplete_array::*;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct lean_object {
pub m_rc: c_int,
pub m_cs_sz: u16,
pub m_other: u8,
pub m_tag: u8,
}
pub type lean_obj_arg = *mut lean_object;
pub type b_lean_obj_arg = *mut lean_object;
pub type u_lean_obj_arg = *mut lean_object;
pub type lean_obj_res = *mut lean_object;
pub type b_lean_obj_res = *mut lean_object;
#[repr(C)]
#[derive(Debug)]
pub struct lean_ctor_object {
pub m_header: lean_object,
pub m_objs: IncompleteArrayField<*mut lean_object>,
}
#[repr(C)]
#[derive(Debug)]
pub struct lean_array_object {
pub m_header: lean_object,
pub m_size: usize,
pub m_capacity: usize,
pub m_data: IncompleteArrayField<*mut lean_object>,
}
#[repr(C)]
#[derive(Debug)]
pub struct lean_sarray_object {
pub m_header: lean_object,
pub m_size: usize,
pub m_capacity: usize,
pub m_data: IncompleteArrayField<u8>,
}
#[repr(C)]
#[derive(Debug)]
pub struct lean_string_object {
pub m_header: lean_object,
pub m_size: usize,
pub m_capacity: usize,
pub m_length: usize,
pub m_data: IncompleteArrayField<c_char>,
}
#[repr(C)]
#[derive(Debug)]
pub struct lean_closure_object {
pub m_header: lean_object,
pub m_fun: *mut c_void,
pub m_arity: u16,
pub m_num_fixed: u16,
pub m_objs: IncompleteArrayField<*mut lean_object>,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct lean_ref_object {
pub m_header: lean_object,
pub m_value: *mut lean_object,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct lean_thunk_object {
pub m_header: lean_object,
pub m_value: u64,
pub m_closure: u64,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct lean_task_imp {
pub m_closure: *mut lean_object,
pub m_head_dep: *mut lean_task_object,
pub m_next_dep: *mut lean_task_object,
pub m_prio: c_uint,
pub m_canceled: u8,
pub m_keep_alive: u8,
pub m_deleted: u8,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct lean_task_object {
pub m_header: lean_object,
pub m_value: u64,
pub m_imp: *mut lean_task_imp,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct lean_promise_object {
pub m_header: lean_object,
pub m_result: *mut lean_task_object,
}
pub type lean_external_finalize_proc = Option<unsafe extern "C" fn(arg1: *mut c_void)>;
pub type lean_external_foreach_proc =
Option<unsafe extern "C" fn(arg1: *mut c_void, arg2: b_lean_obj_arg)>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct lean_external_class {
pub m_finalize: lean_external_finalize_proc,
pub m_foreach: lean_external_foreach_proc,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct lean_external_object {
pub m_header: lean_object,
pub m_class: *mut lean_external_class,
pub m_data: *mut c_void,
}