Major rework of extern ref system for WASM, fixes most possible panics in WASM handling
All checks were successful
continuous-integration/drone Build is passing

This commit is contained in:
2023-06-22 15:43:41 +02:00
parent 6a2353df4c
commit 46195d3042
71 changed files with 2142 additions and 1488 deletions

View File

@@ -61,5 +61,6 @@ extern "C" fn learned_move_restore_all_uses(learned_move: ExternPointer<Arc<Lear
/// Restore the remaining PP by a certain amount. Will prevent it from going above max PP.
#[no_mangle]
extern "C" fn learned_move_restore_uses(learned_move: ExternPointer<Arc<LearnedMove>>, amount: u8) -> NativeResult<()> {
learned_move.as_ref().restore_uses(amount).into()
learned_move.as_ref().restore_uses(amount);
NativeResult::ok(())
}