summaryrefslogtreecommitdiff
path: root/src/util.rs
diff options
context:
space:
mode:
authorAlex Orlenko <zxteam@protonmail.com>2019-09-30 22:14:58 +0100
committerAlex Orlenko <zxteam@protonmail.com>2019-09-30 22:14:58 +0100
commit78480b5f31a4848b8b31230baffb44d7e3f4d81a (patch)
treeb59a75f084a24d3bc703510e6536ad4cfad10edf /src/util.rs
parent54f46271952a609444dab8718ff4770e8c76c16f (diff)
downloadmlua-78480b5f31a4848b8b31230baffb44d7e3f4d81a.zip
Use main state to store extra data and auxiliary registries
Diffstat (limited to 'src/util.rs')
-rw-r--r--src/util.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util.rs b/src/util.rs
index 170e4c3..f6bdffc 100644
--- a/src/util.rs
+++ b/src/util.rs
@@ -442,7 +442,7 @@ pub unsafe extern "C" fn error_traceback(state: *mut ffi::lua_State) -> c_int {
}
// Does not call lua_checkstack, uses 1 stack space.
-pub unsafe fn main_state(state: *mut ffi::lua_State) -> *mut ffi::lua_State {
+pub unsafe fn get_main_state(state: *mut ffi::lua_State) -> *mut ffi::lua_State {
ffi::lua_rawgeti(state, ffi::LUA_REGISTRYINDEX, ffi::LUA_RIDX_MAINTHREAD);
let main_state = ffi::lua_tothread(state, -1);
ffi::lua_pop(state, 1);