lualib.h revision 1.6
1/*	$NetBSD: lualib.h,v 1.6 2017/04/26 13:17:33 mbalmer Exp $	*/
2
3/*
4** Id: lualib.h,v 1.45 2017/01/12 17:14:26 roberto Exp
5** Lua standard libraries
6** See Copyright Notice in lua.h
7*/
8
9
10#ifndef lualib_h
11#define lualib_h
12
13#include "lua.h"
14
15
16/* version suffix for environment variable names */
17#define LUA_VERSUFFIX          "_" LUA_VERSION_MAJOR "_" LUA_VERSION_MINOR
18
19
20LUAMOD_API int (luaopen_base) (lua_State *L);
21
22#define LUA_COLIBNAME	"coroutine"
23LUAMOD_API int (luaopen_coroutine) (lua_State *L);
24
25#define LUA_TABLIBNAME	"table"
26LUAMOD_API int (luaopen_table) (lua_State *L);
27
28#define LUA_IOLIBNAME	"io"
29LUAMOD_API int (luaopen_io) (lua_State *L);
30
31#define LUA_OSLIBNAME	"os"
32LUAMOD_API int (luaopen_os) (lua_State *L);
33
34#define LUA_STRLIBNAME	"string"
35LUAMOD_API int (luaopen_string) (lua_State *L);
36
37#define LUA_UTF8LIBNAME	"utf8"
38LUAMOD_API int (luaopen_utf8) (lua_State *L);
39
40#define LUA_BITLIBNAME	"bit32"
41LUAMOD_API int (luaopen_bit32) (lua_State *L);
42
43#define LUA_MATHLIBNAME	"math"
44LUAMOD_API int (luaopen_math) (lua_State *L);
45
46#define LUA_DBLIBNAME	"debug"
47LUAMOD_API int (luaopen_debug) (lua_State *L);
48
49#define LUA_LOADLIBNAME	"package"
50LUAMOD_API int (luaopen_package) (lua_State *L);
51
52
53/* open all previous libraries */
54LUALIB_API void (luaL_openlibs) (lua_State *L);
55
56
57
58#if !defined(lua_assert)
59#define lua_assert(x)	((void)0)
60#endif
61
62
63#endif
64