luaL_openlib -> luaL_register, luaL_putchar -> luaL_addchar

This commit is contained in:
Roberto Ierusalimschy
2005-08-15 11:12:32 -03:00
parent 16ddf86168
commit 5e8a9e324c
10 changed files with 45 additions and 36 deletions

View File

@@ -1,5 +1,5 @@
/*
** $Id: lbaselib.c,v 1.179 2005/07/07 15:48:29 roberto Exp roberto $
** $Id: lbaselib.c,v 1.180 2005/07/12 18:15:11 roberto Exp roberto $
** Basic library
** See Copyright Notice in lua.h
*/
@@ -602,7 +602,7 @@ static void auxopen (lua_State *L, const char *name,
static void base_open (lua_State *L) {
lua_pushvalue(L, LUA_GLOBALSINDEX);
luaL_openlib(L, NULL, base_funcs, 0); /* open lib into global table */
luaL_register(L, NULL, base_funcs); /* open lib into global table */
lua_pushliteral(L, LUA_VERSION);
lua_setglobal(L, "_VERSION"); /* set global _VERSION */
/* `ipairs' and `pairs' need auxiliary functions as upvalues */
@@ -627,7 +627,7 @@ static void base_open (lua_State *L) {
LUALIB_API int luaopen_base (lua_State *L) {
base_open(L);
luaL_openlib(L, LUA_COLIBNAME, co_funcs, 0);
luaL_register(L, LUA_COLIBNAME, co_funcs);
return 2;
}