@@ -43,27 +43,13 @@ pub fn create_zero_u32_ptr() -> *mut u32 {
4343 Box :: into_raw ( std:: boxed:: Box :: new ( 0 ) )
4444}
4545
46- /// Free a pointer. This method is exported in the WebAssembly module to be used
47- /// on the JavaScript side, see `web-backend.js`.
48- ///
49- /// # Safety
50- ///
51- /// See
52- /// `<https://rust-lang.github.io/rust-clippy/master/index.html#not_unsafe_ptr_arg_deref>`
5346#[ wasm_bindgen]
54- pub unsafe fn free_u32_ptr ( ptr : * mut u32 ) {
47+ pub fn free_u32_ptr ( ptr : * mut u32 ) {
5548 let _drop_me = unsafe { std:: boxed:: Box :: from_raw ( ptr) } ;
5649}
5750
58- /// Set the value of a pointer. This method is exported in the WebAssembly
59- /// module to be used on the JavaScript side, see `web-backend.js`.
60- ///
61- /// # Safety
62- ///
63- /// See
64- /// `<https://rust-lang.github.io/rust-clippy/master/index.html#not_unsafe_ptr_arg_deref>`
6551#[ wasm_bindgen]
66- pub unsafe fn set_u32_ptr ( ptr : * mut u32 , arg : u32 ) {
52+ pub fn set_u32_ptr ( ptr : * mut u32 , arg : u32 ) {
6753 // The rust docs explicitly forbid using this for cross-thread syncronization. Oh well, we
6854 // don't have anything better. As long as it works in practice, we haven't upset the undefined
6955 // behavior dragons.
@@ -72,16 +58,9 @@ pub unsafe fn set_u32_ptr(ptr: *mut u32, arg: u32) {
7258 }
7359}
7460
75- /// This method is exported in the WebAssembly to be used on the JavaScript
76- /// side, see `web-backend.js`.
77- ///
78- /// # Safety
79- ///
80- /// See
81- /// `<https://rust-lang.github.io/rust-clippy/master/index.html#not_unsafe_ptr_arg_deref>`
8261#[ allow( unreachable_code) ]
8362#[ wasm_bindgen]
84- pub unsafe fn wait_until_non_zero ( ptr : * const u32 ) -> u32 {
63+ pub fn wait_until_non_zero ( ptr : * const u32 ) -> u32 {
8564 // The rust docs explicitly forbid using this for cross-thread syncronization. Oh well, we
8665 // don't have anything better. As long as it works in practice, we haven't upset the undefined
8766 // behavior dragons.
0 commit comments