1use std::os::raw::{c_char, c_int};
4
5use super::lua::lua_State;
6
7pub const LUA_COLIBNAME: *const c_char = cstr!("coroutine");
8pub const LUA_TABLIBNAME: *const c_char = cstr!("table");
9pub const LUA_IOLIBNAME: *const c_char = cstr!("io");
10pub const LUA_OSLIBNAME: *const c_char = cstr!("os");
11pub const LUA_STRLIBNAME: *const c_char = cstr!("string");
12pub const LUA_UTF8LIBNAME: *const c_char = cstr!("utf8");
13pub const LUA_MATHLIBNAME: *const c_char = cstr!("math");
14pub const LUA_DBLIBNAME: *const c_char = cstr!("debug");
15pub const LUA_LOADLIBNAME: *const c_char = cstr!("package");
16
17#[cfg_attr(all(windows, raw_dylib), link(name = "lua54", kind = "raw-dylib"))]
18unsafe extern "C-unwind" {
19 pub fn luaopen_base(L: *mut lua_State) -> c_int;
20 pub fn luaopen_coroutine(L: *mut lua_State) -> c_int;
21 pub fn luaopen_table(L: *mut lua_State) -> c_int;
22 pub fn luaopen_io(L: *mut lua_State) -> c_int;
23 pub fn luaopen_os(L: *mut lua_State) -> c_int;
24 pub fn luaopen_string(L: *mut lua_State) -> c_int;
25 pub fn luaopen_utf8(L: *mut lua_State) -> c_int;
26 pub fn luaopen_math(L: *mut lua_State) -> c_int;
27 pub fn luaopen_debug(L: *mut lua_State) -> c_int;
28 pub fn luaopen_package(L: *mut lua_State) -> c_int;
29
30 pub fn luaL_openlibs(L: *mut lua_State);
32}