mirror of
https://github.com/mlua-rs/mlua
synced 2026-06-08 16:05:43 +00:00
Support LUA_LIB_NAME in module mode for windows.
In this mode we will link with the particular lua library.
This commit is contained in:
@@ -14,10 +14,7 @@ pub struct luaL_Reg {
|
||||
pub func: lua_CFunction,
|
||||
}
|
||||
|
||||
#[cfg_attr(
|
||||
all(windows, feature = "module", feature = "vendored"),
|
||||
link(name = "lua52", kind = "raw-dylib")
|
||||
)]
|
||||
#[cfg_attr(all(windows, raw_dylib), link(name = "lua52", kind = "raw-dylib"))]
|
||||
extern "C" {
|
||||
pub fn luaL_checkversion_(L: *mut lua_State, ver: lua_Number);
|
||||
|
||||
@@ -69,10 +66,7 @@ extern "C" {
|
||||
pub const LUA_NOREF: c_int = -2;
|
||||
pub const LUA_REFNIL: c_int = -1;
|
||||
|
||||
#[cfg_attr(
|
||||
all(windows, feature = "module", feature = "vendored"),
|
||||
link(name = "lua52", kind = "raw-dylib")
|
||||
)]
|
||||
#[cfg_attr(all(windows, raw_dylib), link(name = "lua52", kind = "raw-dylib"))]
|
||||
extern "C" {
|
||||
pub fn luaL_ref(L: *mut lua_State, t: c_int) -> c_int;
|
||||
pub fn luaL_unref(L: *mut lua_State, t: c_int, r#ref: c_int);
|
||||
@@ -86,10 +80,7 @@ pub unsafe fn luaL_loadfile(L: *mut lua_State, f: *const c_char) -> c_int {
|
||||
luaL_loadfilex(L, f, ptr::null())
|
||||
}
|
||||
|
||||
#[cfg_attr(
|
||||
all(windows, feature = "module", feature = "vendored"),
|
||||
link(name = "lua52", kind = "raw-dylib")
|
||||
)]
|
||||
#[cfg_attr(all(windows, raw_dylib), link(name = "lua52", kind = "raw-dylib"))]
|
||||
extern "C" {
|
||||
pub fn luaL_loadbufferx(
|
||||
L: *mut lua_State,
|
||||
|
||||
Reference in New Issue
Block a user