mirror of
https://github.com/mii443/wasmer.git
synced 2025-12-10 14:48:27 +00:00
fix(c-api) Mark wasi_env_set_(instance|memory) as deprecated.
This commit is contained in:
@@ -199,30 +199,22 @@ pub extern "C" fn wasi_env_delete(_state: Option<Box<wasi_env_t>>) {}
|
|||||||
|
|
||||||
/// This function is deprecated. You may safely remove all calls to it and everything
|
/// This function is deprecated. You may safely remove all calls to it and everything
|
||||||
/// will continue to work.
|
/// will continue to work.
|
||||||
// Dead code: deprecate or remove
|
///
|
||||||
#[allow(unused_variables)]
|
/// cbindgen:prefix=DEPRECATED("This function is longer necessary. You may safely remove all calls to it and everything will continue to work.")
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub extern "C" fn wasi_env_set_instance(env: &mut wasi_env_t, instance: &wasm_instance_t) -> bool {
|
pub extern "C" fn wasi_env_set_instance(
|
||||||
/*
|
_env: &mut wasi_env_t,
|
||||||
let memory = if let Ok(memory) = instance.inner.exports.get_memory("memory") {
|
_instance: &wasm_instance_t,
|
||||||
memory
|
) -> bool {
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
};
|
|
||||||
env.inner.set_memory(memory.clone());
|
|
||||||
*/
|
|
||||||
|
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
|
||||||
/// This function is deprecated. You may safely remove all calls to it and everything
|
/// This function is deprecated. You may safely remove all calls to it and everything
|
||||||
/// will continue to work.
|
/// will continue to work.
|
||||||
// Dead code: deprecate or remove
|
///
|
||||||
#[allow(unused_variables)]
|
/// cbindgen:prefix=DEPRECATED("This function is no longer necessary. You may safely remove all calls to it and everything will continue to work.")
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub extern "C" fn wasi_env_set_memory(env: &mut wasi_env_t, memory: &wasm_memory_t) {
|
pub extern "C" fn wasi_env_set_memory(_env: &mut wasi_env_t, _memory: &wasm_memory_t) {}
|
||||||
//env.inner.set_memory(memory.inner.clone());
|
|
||||||
}
|
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn wasi_env_read_stdout(
|
pub unsafe extern "C" fn wasi_env_read_stdout(
|
||||||
|
|||||||
Reference in New Issue
Block a user