Skip to content

Commit a45fe9b

Browse files
committed
Bump luau-src to 0.19 (Luau 0.710)
1 parent f1a97e4 commit a45fe9b

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

mlua-sys/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ cfg-if = "1.0"
4343
pkg-config = "0.3.17"
4444
lua-src = { version = ">= 550.0.0, < 550.1.0", optional = true }
4545
luajit-src = { version = ">= 210.6.0, < 210.7.0", optional = true }
46-
luau0-src = { version = "0.18.0", optional = true }
46+
luau0-src = { version = "0.19.0", optional = true }
4747

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

mlua-sys/src/luau/lua.rs

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,6 +501,12 @@ pub type lua_Coverage = unsafe extern "C-unwind" fn(
501501
size: usize,
502502
);
503503

504+
pub type lua_CounterFunction =
505+
unsafe extern "C-unwind" fn(context: *mut c_void, function: *const c_char, linedefined: c_int);
506+
507+
pub type lua_CounterValue =
508+
unsafe extern "C-unwind" fn(context: *mut c_void, kind: c_int, line: c_int, hits: u64);
509+
504510
unsafe extern "C-unwind" {
505511
pub fn lua_stackdepth(L: *mut lua_State) -> c_int;
506512
pub fn lua_getinfo(L: *mut lua_State, level: c_int, what: *const c_char, ar: *mut lua_Debug) -> c_int;
@@ -515,6 +521,14 @@ unsafe extern "C-unwind" {
515521

516522
pub fn lua_getcoverage(L: *mut lua_State, funcindex: c_int, context: *mut c_void, callback: lua_Coverage);
517523

524+
pub fn lua_getcounters(
525+
L: *mut lua_State,
526+
funcindex: c_int,
527+
context: *mut c_void,
528+
functionvisit: lua_CounterFunction,
529+
countervisit: lua_CounterValue,
530+
);
531+
518532
pub fn lua_debugtrace(L: *mut lua_State) -> *const c_char;
519533
}
520534

@@ -552,7 +566,7 @@ pub struct lua_Callbacks {
552566
/// gets called when L is created (LP == parent) or destroyed (LP == NULL)
553567
pub userthread: Option<unsafe extern "C-unwind" fn(LP: *mut lua_State, L: *mut lua_State)>,
554568
/// gets called when a string is created; returned atom can be retrieved via tostringatom
555-
pub useratom: Option<unsafe extern "C-unwind" fn(s: *const c_char, l: usize) -> i16>,
569+
pub useratom: Option<unsafe extern "C-unwind" fn(L: *mut lua_State, s: *const c_char, l: usize) -> i16>,
556570

557571
/// gets called when BREAK instruction is encountered
558572
pub debugbreak: Option<unsafe extern "C-unwind" fn(L: *mut lua_State, ar: *mut lua_Debug)>,

0 commit comments

Comments
 (0)