Skip to content

Commit 53dea31

Browse files
committed
Update Lua* dependencies
1 parent 129dec4 commit 53dea31

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

mlua-sys/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ module = []
3838
cc = "1.0"
3939
cfg-if = "1.0"
4040
pkg-config = "0.3.17"
41-
lua-src = { version = ">= 547.0.0, < 547.1.0", optional = true }
42-
luajit-src = { version = ">= 210.5.0, < 210.6.0", optional = true }
43-
luau0-src = { git = "https://github.com/mlua-rs/luau-src-rs", rev = "dc1102e", optional = true }
41+
lua-src = { version = ">= 547.1.0, < 547.2.0", optional = true }
42+
luajit-src = { version = ">= 210.6.0, < 210.7.0", optional = true }
43+
luau0-src = { version = "0.14.2", optional = true }
4444

4545
[lints.rust]
4646
unexpected_cfgs = { level = "allow", check-cfg = ['cfg(raw_dylib)'] }

mlua-sys/src/luau/luarequire.rs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,9 @@ pub struct luarequire_Configuration {
101101

102102
// Executes the module and places the result on the stack. Returns the number of results placed on the
103103
// stack.
104-
pub load: unsafe extern "C" fn(
104+
// Returning -1 directs the requiring thread to yield. In this case, this thread should be resumed with
105+
// the module result pushed onto its stack.
106+
pub load: unsafe extern "C-unwind" fn(
105107
L: *mut lua_State,
106108
ctx: *mut c_void,
107109
path: *const c_char,
@@ -140,4 +142,11 @@ extern "C-unwind" {
140142
// required.
141143
// Expects the path and table to be passed as arguments on the stack.
142144
pub fn luarequire_registermodule(L: *mut lua_State) -> c_int;
145+
146+
// Clears the entry associated with the given cache key from the require cache.
147+
// Expects the cache key to be passed as an argument on the stack.
148+
pub fn luarequire_clearcacheentry(L: *mut lua_State) -> c_int;
149+
150+
// Clears all entries from the require cache.
151+
pub fn luarequire_clearcache(L: *mut lua_State) -> c_int;
143152
}

0 commit comments

Comments
 (0)