589: wasmer-c-api-changes: making `wasmer_byte_array` fields `public` r=bjfish a=YaronWittenstein

I've added this PR since I've tests that need access to `wasmer_byte_array` field.
Here is an example:
52f04b52cc/crates/svm-wasmer-c-api/tests/c_api.rs (L96)

```rust
unsafe fn cast_wasmer_byte_array_to_string(wasmer_bytes: &wasmer_byte_array) -> String {
    let slice: &[u8] =
        std::slice::from_raw_parts(wasmer_bytes.bytes, wasmer_bytes.bytes_len as usize);

    if let Ok(s) = std::str::from_utf8(slice) {
        s.to_string()
    } else {
        panic!("error converting `wasmer_byte_array` to string")
    }
}
```

@syrusakbary @bjfish @Hywan 

Co-authored-by: Yaron Wittenstein <yaron.wittenstein@gmail.com>
Co-authored-by: Brandon Fish <bjfish@users.noreply.github.com>
This commit is contained in:
bors[bot] 2019-08-01 01:25:02 +00:00
commit f8fa06e5ed

View File

@ -118,6 +118,6 @@ pub struct wasmer_limit_option_t {
#[repr(C)] #[repr(C)]
pub struct wasmer_byte_array { pub struct wasmer_byte_array {
bytes: *const u8, pub bytes: *const u8,
bytes_len: u32, pub bytes_len: u32,
} }