Skip to main content

luaur_vm/macros/
lua_r_checkoffsetinbounds.rs

1#[allow(non_upper_case_globals)]
2#[macro_export]
3macro_rules! luaR_checkoffsetinbounds {
4    ($inst:expr, $offset:expr) => {
5        (core::ffi::c_int::from($offset) >= 0)
6            && (core::ffi::c_int::from($offset) < unsafe { (*(*$inst).lclass).numberofallmembers })
7    };
8}
9
10pub use luaR_checkoffsetinbounds;