mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
added unsafe on function
This commit is contained in:
parent
d7aa26371c
commit
438a0dce88
@ -41,9 +41,7 @@ static mut BUFFERS: Vec<u8> = Vec::new();
|
||||
|
||||
/// Allocate buffer from wasm linear memory
|
||||
#[no_mangle]
|
||||
pub fn wasm_prepare_buffer(size: i32) -> i32 {
|
||||
unsafe {
|
||||
BUFFERS = Vec::<u8>::with_capacity(size as usize);
|
||||
BUFFERS.as_ptr() as i32
|
||||
}
|
||||
pub unsafe fn wasm_prepare_buffer(size: i32) -> i32 {
|
||||
BUFFERS = Vec::<u8>::with_capacity(size as usize);
|
||||
BUFFERS.as_ptr() as i32
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user