mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
added safety section
This commit is contained in:
parent
438a0dce88
commit
248e8f7706
@ -40,6 +40,8 @@ pub fn write_output(value: impl Serialize) -> i32 {
|
||||
static mut BUFFERS: Vec<u8> = Vec::new();
|
||||
|
||||
/// Allocate buffer from wasm linear memory
|
||||
/// # Safety
|
||||
/// This function should never be used only intented to by used by the host
|
||||
#[no_mangle]
|
||||
pub unsafe fn wasm_prepare_buffer(size: i32) -> i32 {
|
||||
BUFFERS = Vec::<u8>::with_capacity(size as usize);
|
||||
|
Loading…
Reference in New Issue
Block a user