luaur_code_gen/macros/vm_interrupt.rs
1#[macro_export]
2#[allow(non_snake_case)]
3macro_rules! VM_INTERRUPT {
4 ($L:expr) => {
5 unsafe {
6 let l_state = $L;
7 let interrupt_fn = (*(*l_state).global).cb.interrupt;
8 if luaur_common::LUAU_UNLIKELY!(!interrupt_fn.is_null()) {
9 interrupt_fn(l_state, 0);
10 }
11 }
12 };
13}
14
15pub use VM_INTERRUPT;