summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorkyren <kerriganw@gmail.com>2017-09-16 21:09:33 -0400
committerGitHub <noreply@github.com>2017-09-16 21:09:33 -0400
commit61dc2823a663de8e5938a66c150906023a9e0fd1 (patch)
tree7d2ac6b7ec7f595e226dbfa4cb78aaa1ae9c7817 /src
parent4b035af0e8050bf70dff22dead5e8ce3e09cf990 (diff)
parenta7a080b50a064d6abb0ddc4acac1b8341b346825 (diff)
downloadmlua-61dc2823a663de8e5938a66c150906023a9e0fd1.zip
Merge pull request #47 from jonas-schievink/base--
Don't load the base library into the "base" global
Diffstat (limited to 'src')
-rw-r--r--src/lua.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/lua.rs b/src/lua.rs
index 9008b97..eb4cb1a 100644
--- a/src/lua.rs
+++ b/src/lua.rs
@@ -1399,7 +1399,6 @@ impl Lua {
stack_guard(state, 0, || {
// Do not open the debug library, currently it can be used to cause unsafety.
ffi::luaL_requiref(state, cstr!("_G"), ffi::luaopen_base, 1);
- ffi::luaL_requiref(state, cstr!("base"), ffi::luaopen_base, 1);
ffi::luaL_requiref(state, cstr!("coroutine"), ffi::luaopen_coroutine, 1);
ffi::luaL_requiref(state, cstr!("table"), ffi::luaopen_table, 1);
ffi::luaL_requiref(state, cstr!("io"), ffi::luaopen_io, 1);
@@ -1408,7 +1407,7 @@ impl Lua {
ffi::luaL_requiref(state, cstr!("utf8"), ffi::luaopen_utf8, 1);
ffi::luaL_requiref(state, cstr!("math"), ffi::luaopen_math, 1);
ffi::luaL_requiref(state, cstr!("package"), ffi::luaopen_package, 1);
- ffi::lua_pop(state, 10);
+ ffi::lua_pop(state, 9);
// Create the userdata registry table