wiggle-generate: always pass GuestPtr by reference
with the prev approach, it would be passed by reference sometimes (e.g. when used as an Array argument) but by value most of the time. this was inconsistient. theres no need to pass the owned version, all operations are &self.
This commit is contained in:
@@ -44,10 +44,13 @@ impl<'a> structs::Structs for WasiCtx<'a> {
|
||||
|
||||
fn return_pair_of_ptrs<'b>(
|
||||
&self,
|
||||
first: GuestPtr<'b, i32>,
|
||||
second: GuestPtr<'b, i32>,
|
||||
first: &GuestPtr<'b, i32>,
|
||||
second: &GuestPtr<'b, i32>,
|
||||
) -> Result<types::PairIntPtrs<'b>, types::Errno> {
|
||||
Ok(types::PairIntPtrs { first, second })
|
||||
Ok(types::PairIntPtrs {
|
||||
first: *first,
|
||||
second: *second,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user