luaur-vm 0.1.0

The Luau register virtual machine and standard library (Rust).
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use crate::macros::api_check::api_check;
use crate::macros::expandstacklimit::expandstacklimit;
use crate::macros::lua_d_checkstack::luaD_checkstack;
use crate::type_aliases::lua_state::lua_State;

pub fn lua_rawcheckstack(L: *mut lua_State, size: core::ffi::c_int) {
    api_check!(L, size >= 0);

    unsafe {
        luaD_checkstack!(L, size);
        expandstacklimit!(L, (*L).top.wrapping_add(size as usize));
    }
}