diff --git a/vm/src/ffi.rs b/vm/src/ffi.rs index d064fe6..2c94d5e 100644 --- a/vm/src/ffi.rs +++ b/vm/src/ffi.rs @@ -128,6 +128,11 @@ impl<'a> FfiCtx<'a> { )) } + #[inline] + pub fn new_empty_interface(&self, underlying: GosValue, meta: Meta) -> GosValue { + GosValue::new_interface(InterfaceObj::with_value(underlying, Some((meta, vec![])))) + } + #[inline] pub fn deref_pointer(&self, ptr: &GosValue) -> RuntimeResult { ptr.as_non_nil_pointer()?