mirror of
https://github.com/fluencelabs/wasmer
synced 2025-04-25 18:32:15 +00:00
Deprecate wasmer_trampoline_buffer_builder_add_callinfo_trampoline.
This commit is contained in:
parent
7d2d89b606
commit
3e63f1aaa9
@ -34,6 +34,8 @@ pub unsafe extern "C" fn wasmer_trampoline_buffer_builder_add_context_trampoline
|
||||
}
|
||||
|
||||
/// Adds a callinfo trampoline to the builder.
|
||||
///
|
||||
/// Deprecated. In a future version `DynamicFunc::new` will be exposed to the C API and should be used instead of this function.
|
||||
#[no_mangle]
|
||||
#[allow(clippy::cast_ptr_alignment)]
|
||||
pub unsafe extern "C" fn wasmer_trampoline_buffer_builder_add_callinfo_trampoline(
|
||||
@ -42,8 +44,14 @@ pub unsafe extern "C" fn wasmer_trampoline_buffer_builder_add_callinfo_trampolin
|
||||
ctx: *const c_void,
|
||||
num_params: u32,
|
||||
) -> usize {
|
||||
use wasmer_runtime_core::types::Type;
|
||||
let builder = &mut *(builder as *mut TrampolineBufferBuilder);
|
||||
builder.add_callinfo_trampoline(mem::transmute(func), ctx as *const CallContext, num_params)
|
||||
builder.add_callinfo_trampoline(
|
||||
mem::transmute(func),
|
||||
ctx as *const CallContext,
|
||||
&vec![Type::I64; num_params as usize],
|
||||
&[Type::I64],
|
||||
)
|
||||
}
|
||||
|
||||
/// Finalizes the trampoline builder into an executable buffer.
|
||||
|
@ -1386,6 +1386,8 @@ wasmer_result_t wasmer_table_new(wasmer_table_t **table, wasmer_limits_t limits)
|
||||
#if (!defined(_WIN32) && defined(ARCH_X86_64))
|
||||
/**
|
||||
* Adds a callinfo trampoline to the builder.
|
||||
*
|
||||
* Deprecated. In a future version `DynamicFunc::new` will be exposed to the C API and should be used instead of this function.
|
||||
*/
|
||||
uintptr_t wasmer_trampoline_buffer_builder_add_callinfo_trampoline(wasmer_trampoline_buffer_builder_t *builder,
|
||||
const wasmer_trampoline_callable_t *func,
|
||||
|
@ -1146,6 +1146,8 @@ wasmer_result_t wasmer_table_new(wasmer_table_t **table, wasmer_limits_t limits)
|
||||
|
||||
#if (!defined(_WIN32) && defined(ARCH_X86_64))
|
||||
/// Adds a callinfo trampoline to the builder.
|
||||
///
|
||||
/// Deprecated. In a future version `DynamicFunc::new` will be exposed to the C API and should be used instead of this function.
|
||||
uintptr_t wasmer_trampoline_buffer_builder_add_callinfo_trampoline(wasmer_trampoline_buffer_builder_t *builder,
|
||||
const wasmer_trampoline_callable_t *func,
|
||||
const void *ctx,
|
||||
|
Loading…
x
Reference in New Issue
Block a user