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_OSLIBNAME: *const c_char = cstr!("os");
10pub const LUA_STRLIBNAME: *const c_char = cstr!("string");
11pub const LUA_BITLIBNAME: *const c_char = cstr!("bit32");
12pub const LUA_BUFFERLIBNAME: *const c_char = cstr!("buffer");
13pub const LUA_UTF8LIBNAME: *const c_char = cstr!("utf8");
14pub const LUA_MATHLIBNAME: *const c_char = cstr!("math");
15pub const LUA_DBLIBNAME: *const c_char = cstr!("debug");
16pub const LUA_VECLIBNAME: *const c_char = cstr!("vector");
17
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_os(L: *mut lua_State) -> c_int;
23 pub fn luaopen_string(L: *mut lua_State) -> c_int;
24 pub fn luaopen_bit32(L: *mut lua_State) -> c_int;
25 pub fn luaopen_buffer(L: *mut lua_State) -> c_int;
26 pub fn luaopen_utf8(L: *mut lua_State) -> c_int;
27 pub fn luaopen_math(L: *mut lua_State) -> c_int;
28 pub fn luaopen_debug(L: *mut lua_State) -> c_int;
29 pub fn luaopen_vector(L: *mut lua_State) -> c_int;
30
31 pub fn luaL_openlibs(L: *mut lua_State);
33}