luaur-vm 0.1.1

The Luau register virtual machine and standard library (Rust).
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#[allow(non_snake_case)]
#[macro_export]
macro_rules! GC_INTERRUPT {
    ($L:expr, $state:expr) => {
        unsafe {
            let g = &*(*$L).global;
            let interrupt = g.cb.interrupt;
            if luaur_common::LUAU_UNLIKELY(interrupt.is_some()) {
                if let Some(interrupt_fn) = interrupt {
                    interrupt_fn($L, $state);
                }
            }
        }
    };
}

pub use GC_INTERRUPT;