lualib.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /*
  2. ** $Id: lualib.h $
  3. ** Lua standard libraries
  4. ** See Copyright Notice in lua.h
  5. */
  6. #ifndef lualib_h
  7. #define lualib_h
  8. #include "lua.h"
  9. /* version suffix for environment variable names */
  10. #define LUA_VERSUFFIX "_" LUA_VERSION_MAJOR "_" LUA_VERSION_MINOR
  11. LUAMOD_API int (luaopen_base) (lua_State *L);
  12. #define LUA_COLIBNAME "coroutine"
  13. LUAMOD_API int (luaopen_coroutine) (lua_State *L);
  14. #define LUA_TABLIBNAME "table"
  15. LUAMOD_API int (luaopen_table) (lua_State *L);
  16. #define LUA_IOLIBNAME "io"
  17. LUAMOD_API int (luaopen_io) (lua_State *L);
  18. #define LUA_OSLIBNAME "os"
  19. LUAMOD_API int (luaopen_os) (lua_State *L);
  20. #define LUA_STRLIBNAME "string"
  21. LUAMOD_API int (luaopen_string) (lua_State *L);
  22. #define LUA_UTF8LIBNAME "utf8"
  23. LUAMOD_API int (luaopen_utf8) (lua_State *L);
  24. #define LUA_MATHLIBNAME "math"
  25. LUAMOD_API int (luaopen_math) (lua_State *L);
  26. #define LUA_DBLIBNAME "debug"
  27. LUAMOD_API int (luaopen_debug) (lua_State *L);
  28. #define LUA_LOADLIBNAME "package"
  29. LUAMOD_API int (luaopen_package) (lua_State *L);
  30. /* open all previous libraries */
  31. LUALIB_API void (luaL_openlibs) (lua_State *L);
  32. #if !defined(lua_assert)
  33. #define lua_assert(x) ((void)0)
  34. #endif
  35. #endif