From 8408260eddf95251b30f70c318bbe246029b9fe8 Mon Sep 17 00:00:00 2001 From: Yaron Wittenstein Date: Mon, 29 Jul 2019 17:10:17 +0300 Subject: [PATCH 1/2] wasmer-c-api: adding `#[derive(Debug)]` for `wasmer_result_t` (so that we can do `assert_eq!`) --- lib/runtime-c-api/src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/runtime-c-api/src/lib.rs b/lib/runtime-c-api/src/lib.rs index 51f23517c..b087cd356 100644 --- a/lib/runtime-c-api/src/lib.rs +++ b/lib/runtime-c-api/src/lib.rs @@ -97,6 +97,7 @@ pub mod table; pub mod trampoline; pub mod value; +#[derive(Debug)] #[allow(non_camel_case_types)] #[repr(C)] pub enum wasmer_result_t { From 784e65d587de60792e2cd99e95e086a45a9ef916 Mon Sep 17 00:00:00 2001 From: Yaron Wittenstein Date: Mon, 29 Jul 2019 17:24:43 +0300 Subject: [PATCH 2/2] making `wasmer_byte_array` fields `public` --- lib/runtime-c-api/src/lib.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/runtime-c-api/src/lib.rs b/lib/runtime-c-api/src/lib.rs index b087cd356..52a80f3fc 100644 --- a/lib/runtime-c-api/src/lib.rs +++ b/lib/runtime-c-api/src/lib.rs @@ -97,7 +97,6 @@ pub mod table; pub mod trampoline; pub mod value; -#[derive(Debug)] #[allow(non_camel_case_types)] #[repr(C)] pub enum wasmer_result_t { @@ -119,6 +118,6 @@ pub struct wasmer_limit_option_t { #[repr(C)] pub struct wasmer_byte_array { - bytes: *const u8, - bytes_len: u32, + pub bytes: *const u8, + pub bytes_len: u32, }