pub fn requiref(
state: &mut LuaState,
modname: &[u8],
openf: fn(&mut LuaState) -> Result<usize, LuaError>,
glb: bool,
) -> Result<(), LuaError>Expand description
Simplified require: open module modname via openf, register it in
package.loaded, and (if glb) in the global table.
Leaves the module on top of the stack.
C: LUALIB_API void luaL_requiref(lua_State *L, const char *modname, lua_CFunction openf, int glb)