mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-23 05:31:32 +00:00
Moved ctx to be the first argument in emscripten
This commit is contained in:
@ -3,12 +3,12 @@ use libc::printf as _printf;
|
||||
use wasmer_runtime_core::vm::Ctx;
|
||||
|
||||
/// putchar
|
||||
pub fn putchar(chr: i32, ctx: &mut Ctx) {
|
||||
pub fn putchar(ctx: &mut Ctx, chr: i32) {
|
||||
unsafe { libc::putchar(chr) };
|
||||
}
|
||||
|
||||
/// printf
|
||||
pub fn printf(memory_offset: i32, extra: i32, ctx: &mut Ctx) -> i32 {
|
||||
pub fn printf(ctx: &mut Ctx, memory_offset: i32, extra: i32) -> i32 {
|
||||
debug!("emscripten::printf {}, {}", memory_offset, extra);
|
||||
unsafe {
|
||||
let addr = emscripten_memory_pointer!(ctx.memory(0), memory_offset) as _;
|
||||
|
Reference in New Issue
Block a user