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::records::lua_state::lua_State;

#[allow(non_snake_case)]
#[inline]
pub fn getgrownstacksize(L: *mut lua_State, n: core::ffi::c_int) -> core::ffi::c_int {
    unsafe {
        if n <= (*L).stacksize {
            2 * (*L).stacksize
        } else {
            (*L).stacksize + n
        }
    }
}