summaryrefslogtreecommitdiff
path: root/mlua-sys
diff options
context:
space:
mode:
Diffstat (limited to 'mlua-sys')
-rw-r--r--mlua-sys/src/lua51/lua.rs1
-rw-r--r--mlua-sys/src/lua52/lua.rs1
-rw-r--r--mlua-sys/src/lua53/lua.rs1
-rw-r--r--mlua-sys/src/lua54/lua.rs2
4 files changed, 5 insertions, 0 deletions
diff --git a/mlua-sys/src/lua51/lua.rs b/mlua-sys/src/lua51/lua.rs
index 5cd351d..db409aa 100644
--- a/mlua-sys/src/lua51/lua.rs
+++ b/mlua-sys/src/lua51/lua.rs
@@ -239,6 +239,7 @@ extern "C-unwind" {
// lua_error does not return but is declared to return int, and Rust translates
// ! to void which can cause link-time errors if the platform linker is aware
// of return types and requires they match (for example: wasm does this).
+#[inline(always)]
pub unsafe fn lua_error(L: *mut lua_State) -> ! {
lua_error_(L);
unreachable!();
diff --git a/mlua-sys/src/lua52/lua.rs b/mlua-sys/src/lua52/lua.rs
index f7bdbdf..8040d5d 100644
--- a/mlua-sys/src/lua52/lua.rs
+++ b/mlua-sys/src/lua52/lua.rs
@@ -320,6 +320,7 @@ extern "C-unwind" {
// lua_error does not return but is declared to return int, and Rust translates
// ! to void which can cause link-time errors if the platform linker is aware
// of return types and requires they match (for example: wasm does this).
+#[inline(always)]
pub unsafe fn lua_error(L: *mut lua_State) -> ! {
lua_error_(L);
unreachable!();
diff --git a/mlua-sys/src/lua53/lua.rs b/mlua-sys/src/lua53/lua.rs
index 393ff3c..b726911 100644
--- a/mlua-sys/src/lua53/lua.rs
+++ b/mlua-sys/src/lua53/lua.rs
@@ -327,6 +327,7 @@ extern "C-unwind" {
// lua_error does not return but is declared to return int, and Rust translates
// ! to void which can cause link-time errors if the platform linker is aware
// of return types and requires they match (for example: wasm does this).
+#[inline(always)]
pub unsafe fn lua_error(L: *mut lua_State) -> ! {
lua_error_(L);
unreachable!();
diff --git a/mlua-sys/src/lua54/lua.rs b/mlua-sys/src/lua54/lua.rs
index b134866..26ad0a6 100644
--- a/mlua-sys/src/lua54/lua.rs
+++ b/mlua-sys/src/lua54/lua.rs
@@ -159,6 +159,7 @@ extern "C-unwind" {
// lua_rawlen's return type changed from size_t to lua_Unsigned int in Lua 5.4.
// This adapts the crate API to the new Lua ABI.
+#[inline(always)]
pub unsafe fn lua_rawlen(L: *mut lua_State, idx: c_int) -> usize {
lua_rawlen_(L, idx) as usize
}
@@ -359,6 +360,7 @@ extern "C-unwind" {
// lua_error does not return but is declared to return int, and Rust translates
// ! to void which can cause link-time errors if the platform linker is aware
// of return types and requires they match (for example: wasm does this).
+#[inline(always)]
pub unsafe fn lua_error(L: *mut lua_State) -> ! {
lua_error_(L);
unreachable!();