From 4d5fe1f54bc00850f77a7c42f9e95d0ff3f1ab5b Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 10 Dec 2003 09:04:54 -0200 Subject: detail --- lbaselib.c | 4 ++-- lua.h | 7 ++----- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/lbaselib.c b/lbaselib.c index 05b2ca1b..f59e6460 100644 --- a/lbaselib.c +++ b/lbaselib.c @@ -1,5 +1,5 @@ /* -** $Id: lbaselib.c,v 1.137 2003/11/05 11:59:14 roberto Exp roberto $ +** $Id: lbaselib.c,v 1.138 2003/11/11 16:34:17 roberto Exp roberto $ ** Basic library ** See Copyright Notice in lua.h */ @@ -297,7 +297,7 @@ static const char *generic_reader (lua_State *L, void *ud, size_t *size) { static int luaB_load (lua_State *L) { struct Aux_load al; int status; - const char *cname = luaL_optstring(L, 2, "= generic load"); + const char *cname = luaL_optstring(L, 2, "=(load)"); luaL_checktype(L, 1, LUA_TFUNCTION); lua_settop(L, 1); al.func = luaL_ref(L, LUA_REGISTRYINDEX); diff --git a/lua.h b/lua.h index 319d5d06..4f2f256d 100644 --- a/lua.h +++ b/lua.h @@ -1,5 +1,5 @@ /* -** $Id: lua.h,v 1.184 2003/10/21 10:58:58 roberto Exp roberto $ +** $Id: lua.h,v 1.185 2003/11/05 11:59:14 roberto Exp roberto $ ** Lua - An Extensible Extension Language ** Tecgraf: Computer Graphics Technology Group, PUC-Rio, Brazil ** http://www.lua.org mailto:info@lua.org @@ -258,10 +258,7 @@ LUA_API lua_Alloc lua_getallocf (lua_State *L, void **ud); #define lua_newtable(L) lua_createtable(L, 0, 0) -#define lua_register(L,n,f) \ - (lua_pushstring(L, n), \ - lua_pushcfunction(L, f), \ - lua_settable(L, LUA_GLOBALSINDEX)) +#define lua_register(L,n,f) (lua_pushcfunction(L,f), lua_setglobal(L,n)) #define lua_pushcfunction(L,f) lua_pushcclosure(L, f, 0) -- cgit v1.2.3-55-g6feb