Added ability to load debug lib, Fixes #52

This commit is contained in:
Timidger 2017-10-28 20:46:24 -07:00
parent 00a3153ae0
commit 2658433bd1

View file

@ -557,6 +557,14 @@ impl Lua {
}
}
/// Loads the Lua debug library.
///
/// The debug library is very unsound, loading it and using it breaks all
/// the guarantees of rlua.
pub unsafe fn load_debug(&self) {
ffi::luaL_requiref(self.state, cstr!("debug"), ffi::luaopen_debug, 1);
}
/// Loads a chunk of Lua code and returns it as a function.
///
/// The source can be named by setting the `name` parameter. This is generally recommended as it