mirror of
https://github.com/IntQuant/noita_entangled_worlds.git
synced 2025-10-19 07:03:16 +00:00
15 lines
325 B
Rust
15 lines
325 B
Rust
![]() |
use crate::{lua_bindings::lua_State, LUA};
|
||
|
|
||
|
#[derive(Clone, Copy)]
|
||
|
pub(crate) struct LuaState(*mut lua_State);
|
||
|
|
||
|
impl LuaState {
|
||
|
pub(crate) fn new(lua: *mut lua_State) -> Self {
|
||
|
Self(lua)
|
||
|
}
|
||
|
|
||
|
pub(crate) fn to_integer(&self, index: i32) -> isize {
|
||
|
unsafe { LUA.lua_tointeger(self.0, index) }
|
||
|
}
|
||
|
}
|