diff options
Diffstat (limited to 'lua.c')
| -rw-r--r-- | lua.c | 16 |
1 files changed, 8 insertions, 8 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lua.c,v 1.116 2003/01/29 13:23:45 roberto Exp roberto $ | 2 | ** $Id: lua.c,v 1.117 2003/03/07 13:21:31 roberto Exp roberto $ |
| 3 | ** Lua stand-alone interpreter | 3 | ** Lua stand-alone interpreter |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -67,12 +67,12 @@ static const char *progname = PROGNAME; | |||
| 67 | 67 | ||
| 68 | 68 | ||
| 69 | static const luaL_reg lualibs[] = { | 69 | static const luaL_reg lualibs[] = { |
| 70 | {"baselib", lua_baselibopen}, | 70 | {"base", luaopen_base}, |
| 71 | {"tablib", lua_tablibopen}, | 71 | {"table", luaopen_table}, |
| 72 | {"iolib", lua_iolibopen}, | 72 | {"io", luaopen_io}, |
| 73 | {"strlib", lua_strlibopen}, | 73 | {"string", luaopen_string}, |
| 74 | {"mathlib", lua_mathlibopen}, | 74 | {"math", luaopen_math}, |
| 75 | {"dblib", lua_dblibopen}, | 75 | {"debug", luaopen_debug}, |
| 76 | /* add your libraries here */ | 76 | /* add your libraries here */ |
| 77 | LUA_EXTRALIBS | 77 | LUA_EXTRALIBS |
| 78 | {NULL, NULL} | 78 | {NULL, NULL} |
| @@ -372,7 +372,7 @@ static int handle_argv (char *argv[], int *interactive) { | |||
| 372 | 372 | ||
| 373 | static void openstdlibs (lua_State *l) { | 373 | static void openstdlibs (lua_State *l) { |
| 374 | const luaL_reg *lib = lualibs; | 374 | const luaL_reg *lib = lualibs; |
| 375 | for (; lib->name; lib++) { | 375 | for (; lib->func; lib++) { |
| 376 | lib->func(l); /* open library */ | 376 | lib->func(l); /* open library */ |
| 377 | lua_settop(l, 0); /* discard any results */ | 377 | lua_settop(l, 0); /* discard any results */ |
| 378 | } | 378 | } |
