mirror of
https://github.com/fluencelabs/wasmer
synced 2024-12-13 06:15:33 +00:00
Merge branch 'master' into feature/runtime-upgrade
This commit is contained in:
commit
81fb2fbd0b
@ -15,7 +15,7 @@ include = [
|
|||||||
"Cargo.toml",
|
"Cargo.toml",
|
||||||
"LICENSE",
|
"LICENSE",
|
||||||
"Makefile",
|
"Makefile",
|
||||||
"README.md",
|
"/README.md",
|
||||||
"rustfmt.toml"
|
"rustfmt.toml"
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
use crate::webassembly::LinearMemory;
|
// use crate::webassembly::LinearMemory;
|
||||||
|
|
||||||
pub fn align_memory(ptr: u32) -> u32 {
|
pub fn align_memory(ptr: u32) -> u32 {
|
||||||
(ptr + 15) & !15
|
(ptr + 15) & !15
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
use super::utils::{copy_cstr_into_wasm, write_to_buf};
|
use super::utils::{copy_cstr_into_wasm, write_to_buf};
|
||||||
use libc::{
|
use libc::{
|
||||||
c_int,
|
c_int,
|
||||||
c_long,
|
|
||||||
clock_gettime as libc_clock_gettime,
|
clock_gettime as libc_clock_gettime,
|
||||||
localtime,
|
localtime,
|
||||||
localtime_r,
|
localtime_r,
|
||||||
|
@ -20,10 +20,8 @@ pub fn is_emscripten_module(module: &Module) -> bool {
|
|||||||
pub unsafe fn write_to_buf(string: *const c_char, buf: u32, max: u32, instance: &Instance) -> u32 {
|
pub unsafe fn write_to_buf(string: *const c_char, buf: u32, max: u32, instance: &Instance) -> u32 {
|
||||||
let buf_addr = instance.memory_offset_addr(0, buf as _) as *mut c_char;
|
let buf_addr = instance.memory_offset_addr(0, buf as _) as *mut c_char;
|
||||||
|
|
||||||
unsafe {
|
for i in 0..max {
|
||||||
for i in 0..max {
|
*buf_addr.add(i as _) = *string.add(i as _);
|
||||||
*buf_addr.add(i as _) = *string.add(i as _);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
buf
|
buf
|
||||||
|
Loading…
Reference in New Issue
Block a user