Change Lua library name constants from &str to *const c_char.

It makes easier to pass them to Lua API functions.
This commit is contained in:
Alex Orlenko
2025-03-14 23:10:14 +00:00
parent 8e244a25ea
commit 272cfdb89b
8 changed files with 63 additions and 80 deletions
+2 -2
View File
@@ -9,10 +9,10 @@ use super::lua::{self, lua_CFunction, lua_Integer, lua_Number, lua_State};
pub const LUA_ERRFILE: c_int = lua::LUA_ERRERR + 1;
// Key, in the registry, for table of loaded modules
pub const LUA_LOADED_TABLE: &str = "_LOADED";
pub const LUA_LOADED_TABLE: *const c_char = cstr!("_LOADED");
// Key, in the registry, for table of preloaded loaders
pub const LUA_PRELOAD_TABLE: &str = "_PRELOAD";
pub const LUA_PRELOAD_TABLE: *const c_char = cstr!("_PRELOAD");
#[repr(C)]
pub struct luaL_Reg {