Added ability to load debug lib, Fixes #52
This commit is contained in:
parent
00a3153ae0
commit
2658433bd1
|
@ -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.
|
/// 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
|
/// The source can be named by setting the `name` parameter. This is generally recommended as it
|
||||||
|
|
Loading…
Reference in New Issue