mirror of
https://github.com/fluencelabs/marine-rs-sdk
synced 2025-03-15 22:30:50 +00:00
use get_result_ptr instead of stack result
This commit is contained in:
parent
c593202ec9
commit
e5d564d4a6
@ -45,15 +45,18 @@ impl CallParameters {
|
|||||||
#[cfg(target_arch = "wasm32")]
|
#[cfg(target_arch = "wasm32")]
|
||||||
pub fn get_call_parameters() -> CallParameters {
|
pub fn get_call_parameters() -> CallParameters {
|
||||||
// it's safe until it is executed on standard Fluence node with appropriate import function
|
// it's safe until it is executed on standard Fluence node with appropriate import function
|
||||||
unsafe { get_call_raw_parameters() }
|
unsafe {
|
||||||
|
get_call_raw_parameters();
|
||||||
|
let raw_call_parameters = crate::result::get_result_ptr();
|
||||||
|
CallParameters::__fce_generated_deserialize(raw_call_parameters as _)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[fce]
|
|
||||||
#[cfg(target_arch = "wasm32")]
|
#[cfg(target_arch = "wasm32")]
|
||||||
#[link(wasm_import_module = "host")]
|
#[link(wasm_import_module = "host")]
|
||||||
#[allow(improper_ctypes)]
|
#[allow(improper_ctypes)]
|
||||||
extern "C" {
|
extern "C" {
|
||||||
// returns serialized current call parameters
|
// returns serialized current call parameters
|
||||||
#[link_name = "get_call_parameters"]
|
#[link_name = "get_call_parameters"]
|
||||||
fn get_call_raw_parameters() -> CallParameters;
|
fn get_call_raw_parameters();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user