Commit 05584663 authored by Kunshan Wang's avatar Kunshan Wang

API-GEN: Generated return value converters.

Now the API stubs (__api_impl_stubs.rs) should be ready for use.
parent 7ea266ca
......@@ -32,11 +32,11 @@ impl MuVM {
panic!("Not implemented")
}
pub fn id_of(&mut self, name: MuName) -> CMuID {
pub fn id_of(&mut self, name: MuName) -> MuID {
panic!("Not implemented")
}
pub fn name_of(&mut self, id: MuID) -> CMuName {
pub fn name_of(&mut self, id: MuID) -> CMuCString {
panic!("Not implemented")
}
......@@ -47,11 +47,11 @@ impl MuVM {
}
impl MuCtx {
pub fn id_of(&mut self, name: MuName) -> CMuID {
pub fn id_of(&mut self, name: MuName) -> MuID {
panic!("Not implemented")
}
pub fn name_of(&mut self, id: MuID) -> CMuName {
pub fn name_of(&mut self, id: MuID) -> CMuCString {
panic!("Not implemented")
}
......@@ -187,11 +187,11 @@ impl MuCtx {
panic!("Not implemented")
}
pub fn ref_eq(&mut self, lhs: &APIMuValue, rhs: &APIMuValue) -> CMuBool {
pub fn ref_eq(&mut self, lhs: &APIMuValue, rhs: &APIMuValue) -> bool {
panic!("Not implemented")
}
pub fn ref_ult(&mut self, lhs: &APIMuValue, rhs: &APIMuValue) -> CMuBool {
pub fn ref_ult(&mut self, lhs: &APIMuValue, rhs: &APIMuValue) -> bool {
panic!("Not implemented")
}
......@@ -303,15 +303,15 @@ impl MuCtx {
panic!("Not implemented")
}
pub fn cur_func(&mut self, cursor: &APIMuValue) -> CMuID {
pub fn cur_func(&mut self, cursor: &APIMuValue) -> MuID {
panic!("Not implemented")
}
pub fn cur_func_ver(&mut self, cursor: &APIMuValue) -> CMuID {
pub fn cur_func_ver(&mut self, cursor: &APIMuValue) -> MuID {
panic!("Not implemented")
}
pub fn cur_inst(&mut self, cursor: &APIMuValue) -> CMuID {
pub fn cur_inst(&mut self, cursor: &APIMuValue) -> MuID {
panic!("Not implemented")
}
......@@ -327,15 +327,15 @@ impl MuCtx {
panic!("Not implemented")
}
pub fn tr64_is_fp(&mut self, value: &APIMuValue) -> CMuBool {
pub fn tr64_is_fp(&mut self, value: &APIMuValue) -> bool {
panic!("Not implemented")
}
pub fn tr64_is_int(&mut self, value: &APIMuValue) -> CMuBool {
pub fn tr64_is_int(&mut self, value: &APIMuValue) -> bool {
panic!("Not implemented")
}
pub fn tr64_is_ref(&mut self, value: &APIMuValue) -> CMuBool {
pub fn tr64_is_ref(&mut self, value: &APIMuValue) -> bool {
panic!("Not implemented")
}
......@@ -414,7 +414,7 @@ impl MuIRBuilder {
panic!("Not implemented")
}
pub fn gen_sym(&mut self, name: Option<String>) -> CMuID {
pub fn gen_sym(&mut self, name: Option<String>) -> MuID {
panic!("Not implemented")
}
......
......@@ -166,31 +166,57 @@ fn from_MuCString_array<'a>(ptr: *const CMuCString, len: usize) -> Vec<String> {
slc.iter().map(|&e| from_MuCString(e)).collect::<Vec<_>>()
}
// The following functions `to_*` converts high-level types to C-like types.
#[inline(always)]
fn to_MuID(value: MuID) -> CMuID {
debug_assert!(value <= 0xFFFFFFFFusize);
value as CMuID
}
#[inline(always)]
fn to_handle(muvalue: *mut APIMuValue) -> CMuValue {
debug_assert!(!muvalue.is_null());
muvalue as CMuValue
}
#[inline(always)]
fn to_MuBool(value: bool) -> CMuBool {
if value {
1
} else {
0
}
}
// GEN:BEGIN:Forwarders
extern fn _forwarder__MuVM__new_context(mvm: *mut CMuVM) -> *mut CMuCtx {
let mut _arg_mvm = from_MuVM_ptr(mvm);
unsafe {
let _rv = (*_arg_mvm).new_context();
}
panic!("not implemented")
let _rv = unsafe {
(*_arg_mvm).new_context()
};
let _rv_prep = _rv;
_rv_prep
}
extern fn _forwarder__MuVM__id_of(mvm: *mut CMuVM, name: CMuName) -> CMuID {
let mut _arg_mvm = from_MuVM_ptr(mvm);
let mut _arg_name = from_MuName(name);
unsafe {
let _rv = (*_arg_mvm).id_of(_arg_name);
}
panic!("not implemented")
let _rv = unsafe {
(*_arg_mvm).id_of(_arg_name)
};
let _rv_prep = to_MuID(_rv);
_rv_prep
}
extern fn _forwarder__MuVM__name_of(mvm: *mut CMuVM, id: CMuID) -> CMuName {
let mut _arg_mvm = from_MuVM_ptr(mvm);
let mut _arg_id = from_MuID(id);
unsafe {
let _rv = (*_arg_mvm).name_of(_arg_id);
}
panic!("not implemented")
let _rv = unsafe {
(*_arg_mvm).name_of(_arg_id)
};
let _rv_prep = _rv;
_rv_prep
}
extern fn _forwarder__MuVM__set_trap_handler(mvm: *mut CMuVM, trap_handler: CMuTrapHandler, userdata: CMuCPtr) {
......@@ -198,364 +224,393 @@ extern fn _forwarder__MuVM__set_trap_handler(mvm: *mut CMuVM, trap_handler: CMuT
let mut _arg_trap_handler = trap_handler;
let mut _arg_userdata = userdata;
unsafe {
(*_arg_mvm).set_trap_handler(_arg_trap_handler, _arg_userdata);
}
panic!("not implemented")
(*_arg_mvm).set_trap_handler(_arg_trap_handler, _arg_userdata)
};
}
extern fn _forwarder__MuCtx__id_of(ctx: *mut CMuCtx, name: CMuName) -> CMuID {
let mut _arg_ctx = from_MuCtx_ptr(ctx);
let mut _arg_name = from_MuName(name);
unsafe {
let _rv = (*_arg_ctx).id_of(_arg_name);
}
panic!("not implemented")
let _rv = unsafe {
(*_arg_ctx).id_of(_arg_name)
};
let _rv_prep = to_MuID(_rv);
_rv_prep
}
extern fn _forwarder__MuCtx__name_of(ctx: *mut CMuCtx, id: CMuID) -> CMuName {
let mut _arg_ctx = from_MuCtx_ptr(ctx);
let mut _arg_id = from_MuID(id);
unsafe {
let _rv = (*_arg_ctx).name_of(_arg_id);
}
panic!("not implemented")
let _rv = unsafe {
(*_arg_ctx).name_of(_arg_id)
};
let _rv_prep = _rv;
_rv_prep
}
extern fn _forwarder__MuCtx__close_context(ctx: *mut CMuCtx) {
let mut _arg_ctx = from_MuCtx_ptr(ctx);
unsafe {
(*_arg_ctx).close_context();
}
panic!("not implemented")
(*_arg_ctx).close_context()
};
}
extern fn _forwarder__MuCtx__load_bundle(ctx: *mut CMuCtx, buf: *mut c_char, sz: CMuArraySize) {
let mut _arg_ctx = from_MuCtx_ptr(ctx);
let mut _arg_buf = from_char_array(buf, sz);
unsafe {
(*_arg_ctx).load_bundle(_arg_buf);
}
panic!("not implemented")
(*_arg_ctx).load_bundle(_arg_buf)
};
}
extern fn _forwarder__MuCtx__load_hail(ctx: *mut CMuCtx, buf: *mut c_char, sz: CMuArraySize) {
let mut _arg_ctx = from_MuCtx_ptr(ctx);
let mut _arg_buf = from_char_array(buf, sz);
unsafe {
(*_arg_ctx).load_hail(_arg_buf);
}
panic!("not implemented")
(*_arg_ctx).load_hail(_arg_buf)
};
}
extern fn _forwarder__MuCtx__handle_from_sint8(ctx: *mut CMuCtx, num: i8, len: c_int) -> CMuIntValue {
let mut _arg_ctx = from_MuCtx_ptr(ctx);
let mut _arg_num = num;
let mut _arg_len = len;
unsafe {
let _rv = (*_arg_ctx).handle_from_sint8(_arg_num, _arg_len);
}
panic!("not implemented")
let _rv = unsafe {
(*_arg_ctx).handle_from_sint8(_arg_num, _arg_len)
};
let _rv_prep = to_handle(_rv);
_rv_prep
}
extern fn _forwarder__MuCtx__handle_from_uint8(ctx: *mut CMuCtx, num: u8, len: c_int) -> CMuIntValue {
let mut _arg_ctx = from_MuCtx_ptr(ctx);
let mut _arg_num = num;
let mut _arg_len = len;
unsafe {
let _rv = (*_arg_ctx).handle_from_uint8(_arg_num, _arg_len);
}
panic!("not implemented")
let _rv = unsafe {
(*_arg_ctx).handle_from_uint8(_arg_num, _arg_len)
};
let _rv_prep = to_handle(_rv);
_rv_prep
}
extern fn _forwarder__MuCtx__handle_from_sint16(ctx: *mut CMuCtx, num: i16, len: c_int) -> CMuIntValue {
let mut _arg_ctx = from_MuCtx_ptr(ctx);
let mut _arg_num = num;
let mut _arg_len = len;
unsafe {
let _rv = (*_arg_ctx).handle_from_sint16(_arg_num, _arg_len);
}
panic!("not implemented")
let _rv = unsafe {
(*_arg_ctx).handle_from_sint16(_arg_num, _arg_len)
};
let _rv_prep = to_handle(_rv);
_rv_prep
}
extern fn _forwarder__MuCtx__handle_from_uint16(ctx: *mut CMuCtx, num: u16, len: c_int) -> CMuIntValue {
let mut _arg_ctx = from_MuCtx_ptr(ctx);
let mut _arg_num = num;
let mut _arg_len = len;
unsafe {
let _rv = (*_arg_ctx).handle_from_uint16(_arg_num, _arg_len);
}
panic!("not implemented")
let _rv = unsafe {
(*_arg_ctx).handle_from_uint16(_arg_num, _arg_len)
};
let _rv_prep = to_handle(_rv);
_rv_prep
}
extern fn _forwarder__MuCtx__handle_from_sint32(ctx: *mut CMuCtx, num: i32, len: c_int) -> CMuIntValue {
let mut _arg_ctx = from_MuCtx_ptr(ctx);
let mut _arg_num = num;
let mut _arg_len = len;
unsafe {
let _rv = (*_arg_ctx).handle_from_sint32(_arg_num, _arg_len);
}
panic!("not implemented")
let _rv = unsafe {
(*_arg_ctx).handle_from_sint32(_arg_num, _arg_len)
};
let _rv_prep = to_handle(_rv);
_rv_prep
}
extern fn _forwarder__MuCtx__handle_from_uint32(ctx: *mut CMuCtx, num: u32, len: c_int) -> CMuIntValue {
let mut _arg_ctx = from_MuCtx_ptr(ctx);
let mut _arg_num = num;
let mut _arg_len = len;
unsafe {
let _rv = (*_arg_ctx).handle_from_uint32(_arg_num, _arg_len);
}
panic!("not implemented")
let _rv = unsafe {
(*_arg_ctx).handle_from_uint32(_arg_num, _arg_len)
};
let _rv_prep = to_handle(_rv);
_rv_prep
}
extern fn _forwarder__MuCtx__handle_from_sint64(ctx: *mut CMuCtx, num: i64, len: c_int) -> CMuIntValue {
let mut _arg_ctx = from_MuCtx_ptr(ctx);
let mut _arg_num = num;
let mut _arg_len = len;
unsafe {
let _rv = (*_arg_ctx).handle_from_sint64(_arg_num, _arg_len);
}
panic!("not implemented")
let _rv = unsafe {
(*_arg_ctx).handle_from_sint64(_arg_num, _arg_len)
};
let _rv_prep = to_handle(_rv);
_rv_prep
}
extern fn _forwarder__MuCtx__handle_from_uint64(ctx: *mut CMuCtx, num: u64, len: c_int) -> CMuIntValue {
let mut _arg_ctx = from_MuCtx_ptr(ctx);
let mut _arg_num = num;
let mut _arg_len = len;
unsafe {
let _rv = (*_arg_ctx).handle_from_uint64(_arg_num, _arg_len);
}
panic!("not implemented")
let _rv = unsafe {
(*_arg_ctx).handle_from_uint64(_arg_num, _arg_len)
};
let _rv_prep = to_handle(_rv);
_rv_prep
}
extern fn _forwarder__MuCtx__handle_from_uint64s(ctx: *mut CMuCtx, nums: *mut u64, nnums: CMuArraySize, len: c_int) -> CMuIntValue {
let mut _arg_ctx = from_MuCtx_ptr(ctx);
let mut _arg_nums = from_uint64_t_array(nums, nnums);
let mut _arg_len = len;
unsafe {
let _rv = (*_arg_ctx).handle_from_uint64s(_arg_nums, _arg_len);
}
panic!("not implemented")
let _rv = unsafe {
(*_arg_ctx).handle_from_uint64s(_arg_nums, _arg_len)
};
let _rv_prep = to_handle(_rv);
_rv_prep
}
extern fn _forwarder__MuCtx__handle_from_float(ctx: *mut CMuCtx, num: f32) -> CMuFloatValue {
let mut _arg_ctx = from_MuCtx_ptr(ctx);
let mut _arg_num = num;
unsafe {
let _rv = (*_arg_ctx).handle_from_float(_arg_num);
}
panic!("not implemented")
let _rv = unsafe {
(*_arg_ctx).handle_from_float(_arg_num)
};
let _rv_prep = to_handle(_rv);
_rv_prep
}
extern fn _forwarder__MuCtx__handle_from_double(ctx: *mut CMuCtx, num: f64) -> CMuDoubleValue {
let mut _arg_ctx = from_MuCtx_ptr(ctx);
let mut _arg_num = num;
unsafe {
let _rv = (*_arg_ctx).handle_from_double(_arg_num);
}
panic!("not implemented")
let _rv = unsafe {
(*_arg_ctx).handle_from_double(_arg_num)
};
let _rv_prep = to_handle(_rv);
_rv_prep
}
extern fn _forwarder__MuCtx__handle_from_ptr(ctx: *mut CMuCtx, mu_type: CMuID, ptr: CMuCPtr) -> CMuUPtrValue {
let mut _arg_ctx = from_MuCtx_ptr(ctx);
let mut _arg_mu_type = from_MuID(mu_type);
let mut _arg_ptr = ptr;
unsafe {
let _rv = (*_arg_ctx).handle_from_ptr(_arg_mu_type, _arg_ptr);
}
panic!("not implemented")
let _rv = unsafe {
(*_arg_ctx).handle_from_ptr(_arg_mu_type, _arg_ptr)
};
let _rv_prep = to_handle(_rv);
_rv_prep
}
extern fn _forwarder__MuCtx__handle_from_fp(ctx: *mut CMuCtx, mu_type: CMuID, fp: CMuCFP) -> CMuUFPValue {
let mut _arg_ctx = from_MuCtx_ptr(ctx);
let mut _arg_mu_type = from_MuID(mu_type);
let mut _arg_fp = fp;
unsafe {
let _rv = (*_arg_ctx).handle_from_fp(_arg_mu_type, _arg_fp);
}
panic!("not implemented")
let _rv = unsafe {
(*_arg_ctx).handle_from_fp(_arg_mu_type, _arg_fp)
};
let _rv_prep = to_handle(_rv);
_rv_prep
}
extern fn _forwarder__MuCtx__handle_to_sint8(ctx: *mut CMuCtx, opnd: CMuIntValue) -> i8 {
let mut _arg_ctx = from_MuCtx_ptr(ctx);
let mut _arg_opnd = from_handle(opnd);
unsafe {
let _rv = (*_arg_ctx).handle_to_sint8(_arg_opnd);
}
panic!("not implemented")
let _rv = unsafe {
(*_arg_ctx).handle_to_sint8(_arg_opnd)
};
let _rv_prep = _rv;
_rv_prep
}
extern fn _forwarder__MuCtx__handle_to_uint8(ctx: *mut CMuCtx, opnd: CMuIntValue) -> u8 {
let mut _arg_ctx = from_MuCtx_ptr(ctx);
let mut _arg_opnd = from_handle(opnd);
unsafe {
let _rv = (*_arg_ctx).handle_to_uint8(_arg_opnd);
}
panic!("not implemented")
let _rv = unsafe {
(*_arg_ctx).handle_to_uint8(_arg_opnd)
};
let _rv_prep = _rv;
_rv_prep
}
extern fn _forwarder__MuCtx__handle_to_sint16(ctx: *mut CMuCtx, opnd: CMuIntValue) -> i16 {
let mut _arg_ctx = from_MuCtx_ptr(ctx);
let mut _arg_opnd = from_handle(opnd);
unsafe {
let _rv = (*_arg_ctx).handle_to_sint16(_arg_opnd);
}
panic!("not implemented")
let _rv = unsafe {
(*_arg_ctx).handle_to_sint16(_arg_opnd)
};
let _rv_prep = _rv;
_rv_prep
}
extern fn _forwarder__MuCtx__handle_to_uint16(ctx: *mut CMuCtx, opnd: CMuIntValue) -> u16 {
let mut _arg_ctx = from_MuCtx_ptr(ctx);
let mut _arg_opnd = from_handle(opnd);
unsafe {
let _rv = (*_arg_ctx).handle_to_uint16(_arg_opnd);
}
panic!("not implemented")
let _rv = unsafe {
(*_arg_ctx).handle_to_uint16(_arg_opnd)
};
let _rv_prep = _rv;
_rv_prep
}
extern fn _forwarder__MuCtx__handle_to_sint32(ctx: *mut CMuCtx, opnd: CMuIntValue) -> i32 {
let mut _arg_ctx = from_MuCtx_ptr(ctx);
let mut _arg_opnd = from_handle(opnd);
unsafe {
let _rv = (*_arg_ctx).handle_to_sint32(_arg_opnd);
}
panic!("not implemented")
let _rv = unsafe {
(*_arg_ctx).handle_to_sint32(_arg_opnd)
};
let _rv_prep = _rv;
_rv_prep
}
extern fn _forwarder__MuCtx__handle_to_uint32(ctx: *mut CMuCtx, opnd: CMuIntValue) -> u32 {
let mut _arg_ctx = from_MuCtx_ptr(ctx);
let mut _arg_opnd = from_handle(opnd);
unsafe {
let _rv = (*_arg_ctx).handle_to_uint32(_arg_opnd);
}
panic!("not implemented")
let _rv = unsafe {
(*_arg_ctx).handle_to_uint32(_arg_opnd)
};
let _rv_prep = _rv;
_rv_prep
}
extern fn _forwarder__MuCtx__handle_to_sint64(ctx: *mut CMuCtx, opnd: CMuIntValue) -> i64 {
let mut _arg_ctx = from_MuCtx_ptr(ctx);
let mut _arg_opnd = from_handle(opnd);
unsafe {
let _rv = (*_arg_ctx).handle_to_sint64(_arg_opnd);
}
panic!("not implemented")
let _rv = unsafe {
(*_arg_ctx).handle_to_sint64(_arg_opnd)
};
let _rv_prep = _rv;
_rv_prep
}
extern fn _forwarder__MuCtx__handle_to_uint64(ctx: *mut CMuCtx, opnd: CMuIntValue) -> u64 {
let mut _arg_ctx = from_MuCtx_ptr(ctx);
let mut _arg_opnd = from_handle(opnd);
unsafe {
let _rv = (*_arg_ctx).handle_to_uint64(_arg_opnd);
}
panic!("not implemented")
let _rv = unsafe {
(*_arg_ctx).handle_to_uint64(_arg_opnd)
};
let _rv_prep = _rv;
_rv_prep
}
extern fn _forwarder__MuCtx__handle_to_float(ctx: *mut CMuCtx, opnd: CMuFloatValue) -> f32 {
let mut _arg_ctx = from_MuCtx_ptr(ctx);
let mut _arg_opnd = from_handle(opnd);
unsafe {
let _rv = (*_arg_ctx).handle_to_float(_arg_opnd);
}
panic!("not implemented")
let _rv = unsafe {
(*_arg_ctx).handle_to_float(_arg_opnd)
};
let _rv_prep = _rv;
_rv_prep
}
extern fn _forwarder__MuCtx__handle_to_double(ctx: *mut CMuCtx, opnd: CMuDoubleValue) -> f64 {
let mut _arg_ctx = from_MuCtx_ptr(ctx);
let mut _arg_opnd = from_handle(opnd);
unsafe {
let _rv = (*_arg_ctx).handle_to_double(_arg_opnd);
}
panic!("not implemented")
let _rv = unsafe {
(*_arg_ctx).handle_to_double(_arg_opnd)
};
let _rv_prep = _rv;
_rv_prep
}
extern fn _forwarder__MuCtx__handle_to_ptr(ctx: *mut CMuCtx, opnd: CMuUPtrValue) -> CMuCPtr {
let mut _arg_ctx = from_MuCtx_ptr(ctx);
let mut _arg_opnd = from_handle(opnd);
unsafe {
let _rv = (*_arg_ctx).handle_to_ptr(_arg_opnd);
}
panic!("not implemented")
let _rv = unsafe {
(*_arg_ctx).handle_to_ptr(_arg_opnd)
};
let _rv_prep = _rv;
_rv_prep
}
extern fn _forwarder__MuCtx__handle_to_fp(ctx: *mut CMuCtx, opnd: CMuUFPValue) -> CMuCFP {
let mut _arg_ctx = from_MuCtx_ptr(ctx);
let mut _arg_opnd = from_handle(opnd);
unsafe {
let _rv = (*_arg_ctx).handle_to_fp(_arg_opnd);
}
panic!("not implemented")
let _rv = unsafe {
(*_arg_ctx).handle_to_fp(_arg_opnd)
};
let _rv_prep = _rv;
_rv_prep
}
extern fn _forwarder__MuCtx__handle_from_const(ctx: *mut CMuCtx, id: CMuID) -> CMuValue {
let mut _arg_ctx = from_MuCtx_ptr(ctx);
let mut _arg_id = from_MuID(id);
unsafe {
let _rv = (*_arg_ctx).handle_from_const(_arg_id);
}
panic!("not implemented")
let _rv = unsafe {
(*_arg_ctx).handle_from_const(_arg_id)
};
let _rv_prep = to_handle(_rv);
_rv_prep
}
extern fn _forwarder__MuCtx__handle_from_global(ctx: *mut CMuCtx, id: CMuID) -> CMuIRefValue {
let mut _arg_ctx = from_MuCtx_ptr(ctx);
let mut _arg_id = from_MuID(id);
unsafe {
let _rv = (*_arg_ctx).handle_from_global(_arg_id);
}
panic!("not implemented")
let _rv = unsafe {
(*_arg_ctx).handle_from_global(_arg_id)
};
let _rv_prep = to_handle(_rv);
_rv_prep
}
extern fn _forwarder__MuCtx__handle_from_func(ctx: *mut CMuCtx, id: CMuID) -> CMuFuncRefValue {
let mut _arg_ctx = from_MuCtx_ptr(ctx);
let mut _arg_id = from_MuID(id);
unsafe {
let _rv = (*_arg_ctx).handle_from_func(_arg_id);
}
panic!("not implemented")
let _rv = unsafe {
(*_arg_ctx).handle_from_func(_arg_id)
};
let _rv_prep = to_handle(_rv);
_rv_prep
}
extern fn _forwarder__MuCtx__handle_from_expose(ctx: *mut CMuCtx, id: CMuID) -> CMuValue {
let mut _arg_ctx = from_MuCtx_ptr(ctx);
let mut _arg_id = from_MuID(id);
unsafe {
let _rv = (*_arg_ctx).handle_from_expose(_arg_id);
}
panic!("not implemented")
let _rv = unsafe {
(*_arg_ctx).handle_from_expose(_arg_id)
};
let _rv_prep = to_handle(_rv);
_rv_prep
}
extern fn _forwarder__MuCtx__delete_value(ctx: *mut CMuCtx, opnd: CMuValue) {
let mut _arg_ctx = from_MuCtx_ptr(ctx);
let mut _arg_opnd = from_handle(opnd);
unsafe {
(*_arg_ctx).delete_value(_arg_opnd);
}
panic!("not implemented")
(*_arg_ctx).delete_value(_arg_opnd)
};
}
extern fn _forwarder__MuCtx__ref_eq(ctx: *mut CMuCtx, lhs: CMuGenRefValue, rhs: CMuGenRefValue) -> CMuBool {
let mut _arg_ctx = from_MuCtx_ptr(ctx);
let mut _arg_lhs = from_handle(lhs);
let mut _arg_rhs = from_handle(rhs);
unsafe {
let _rv = (*_arg_ctx).ref_eq(_arg_lhs, _arg_rhs);
}
panic!("not implemented")
let _rv = unsafe {
(*_arg_ctx).ref_eq(_arg_lhs, _arg_rhs)
};
let _rv_prep = to_MuBool(_rv);
_rv_prep
}
extern fn _forwarder__MuCtx__ref_ult(ctx: *mut CMuCtx, lhs: CMuIRefValue, rhs: CMuIRefValue) -> CMuBool {
let mut _arg_ctx = from_MuCtx_ptr(ctx);
let mut _arg_lhs = from_handle(lhs);
let mut _arg_rhs = from_handle(rhs);
unsafe {
let _rv = (*_arg_ctx).ref_ult(_arg_lhs, _arg_rhs);
}
panic!("not implemented")
let _rv = unsafe {
(*_arg_ctx).ref_ult(_arg_lhs, _arg_rhs)
};
let _rv_prep = to_MuBool(_rv);
_rv_prep
}
extern fn _forwarder__MuCtx__extract_value(ctx: *mut CMuCtx, str: CMuStructValue, index: c_int) -> CMuValue {
let mut _arg_ctx = from_MuCtx_ptr(ctx);
let mut _arg_str = from_handle(str);
let mut _arg_index = index;
unsafe {
let _rv = (*_arg_ctx).extract_value(_arg_str, _arg_index);
}
panic!("not implemented")
let _rv = unsafe {
(*_arg_ctx).extract_value(_arg_str, _arg_index)
};
let _rv_prep = to_handle(_rv);
_rv_prep
}
extern fn _forwarder__MuCtx__insert_value(ctx: *mut CMuCtx, str: CMuStructValue, index