Type Alias simics_api_sys::py_wrap_c_func_t

source ·
pub type py_wrap_c_func_t = py_wrap_c_func;
Expand description

struct to hold data about each type of generated trampolines (one per signature)

Aliased Type§

struct py_wrap_c_func_t {
    pub meth: PyMethodDef,
    pub python_caller: Option<unsafe extern "C" fn()>,
    pub trampoline_data: *const trampoline_data,
    pub is_method: bool,
    pub arity: u8,
    pub c_to_py_table: *mut ht_int_table_t,
    pub py_to_c_dict: *mut _object,
}

Fields§

§meth: PyMethodDef

Python definition

§python_caller: Option<unsafe extern "C" fn()>

C function that converts arguments and calls Python

§trampoline_data: *const trampoline_data

information about generated trampolines

§is_method: bool

non-zero if this is a “method” function that can bind to an object

§arity: u8

Number of arguments the function takes, including the first “object” argument if it is a method.

§c_to_py_table: *mut ht_int_table_t

Python wrapper, indexed by a hash of the C function and bound object

§py_to_c_dict: *mut _object

PyDictObject with PyCObject(C wrapper), indexed by Python object