Mercurial > vba-clojure
view src/lua/linit.c @ 592:db61317863a7
added buttons
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Sat, 01 Sep 2012 11:59:05 -0500 |
parents | 27763b933818 |
children |
line wrap: on
line source
1 /*2 ** $Id: linit.c,v 1.14.1.1 2007/12/27 13:02:25 roberto Exp $3 ** Initialization of libraries for lua.c4 ** See Copyright Notice in lua.h5 */8 #define linit_c9 #define LUA_LIB11 #include "lua.h"13 #include "lualib.h"14 #include "lauxlib.h"17 static const luaL_Reg lualibs[] = {18 {"", luaopen_base},19 {LUA_LOADLIBNAME, luaopen_package},20 {LUA_TABLIBNAME, luaopen_table},21 {LUA_IOLIBNAME, luaopen_io},22 {LUA_OSLIBNAME, luaopen_os},23 {LUA_STRLIBNAME, luaopen_string},24 {LUA_MATHLIBNAME, luaopen_math},25 {LUA_DBLIBNAME, luaopen_debug},26 {NULL, NULL}27 };30 LUALIB_API void luaL_openlibs (lua_State *L) {31 const luaL_Reg *lib = lualibs;32 for (; lib->func; lib++) {33 lua_pushcfunction(L, lib->func);34 lua_pushstring(L, lib->name);35 lua_call(L, 1, 0);36 }37 }