Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,9 @@ impl Lua {
let lua = unsafe { Self::inner_new(libs, options) };

if libs.contains(StdLib::PACKAGE) {
mlua_expect!(lua.disable_c_modules(), "Error disabling C modules");
// This may already have been done at compile time,
// so we need to handle this gracefully.
let _ = lua.disable_c_modules();
}
lua.lock().mark_safe();

Expand Down