add a lifetime to the wiggle_runtime::GuestErrorType trait (#41)

* add a lifetime to the wiggle_runtime::GuestErrorType trait, wiggle_tests::WasiCtx struct

* wiggle-generate: make config parsing public so it can be reused in lucet
This commit is contained in:
Pat Hickey
2020-03-10 14:48:57 -07:00
committed by GitHub
parent 2139020d6d
commit cd484e4993
14 changed files with 46 additions and 34 deletions

View File

@@ -9,13 +9,13 @@ wiggle::from_witx!({
impl_errno!(types::Errno);
impl pointers::Pointers for WasiCtx {
fn pointers_and_enums<'a>(
impl<'a> pointers::Pointers for WasiCtx<'a> {
fn pointers_and_enums<'b>(
&self,
input1: types::Excuse,
input2_ptr: GuestPtr<'a, types::Excuse>,
input3_ptr: GuestPtr<'a, types::Excuse>,
input4_ptr_ptr: GuestPtr<'a, GuestPtr<'a, types::Excuse>>,
input2_ptr: GuestPtr<'b, types::Excuse>,
input3_ptr: GuestPtr<'b, types::Excuse>,
input4_ptr_ptr: GuestPtr<'b, GuestPtr<'b, types::Excuse>>,
) -> Result<(), types::Errno> {
println!("BAZ input1 {:?}", input1);
let input2: types::Excuse = input2_ptr.read().map_err(|e| {