aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2003-12-10 09:04:54 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2003-12-10 09:04:54 -0200
commit4d5fe1f54bc00850f77a7c42f9e95d0ff3f1ab5b (patch)
tree638c9519396992c10733282c767fb0ab02dc3c5b
parentdf429f163ada6581d921e7f51b016f1abfeefddd (diff)
downloadlua-4d5fe1f54bc00850f77a7c42f9e95d0ff3f1ab5b.tar.gz
lua-4d5fe1f54bc00850f77a7c42f9e95d0ff3f1ab5b.tar.bz2
lua-4d5fe1f54bc00850f77a7c42f9e95d0ff3f1ab5b.zip
detail
-rw-r--r--lbaselib.c4
-rw-r--r--lua.h7
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 @@
1/* 1/*
2** $Id: lbaselib.c,v 1.137 2003/11/05 11:59:14 roberto Exp roberto $ 2** $Id: lbaselib.c,v 1.138 2003/11/11 16:34:17 roberto Exp roberto $
3** Basic library 3** Basic library
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -297,7 +297,7 @@ static const char *generic_reader (lua_State *L, void *ud, size_t *size) {
297static int luaB_load (lua_State *L) { 297static int luaB_load (lua_State *L) {
298 struct Aux_load al; 298 struct Aux_load al;
299 int status; 299 int status;
300 const char *cname = luaL_optstring(L, 2, "= generic load"); 300 const char *cname = luaL_optstring(L, 2, "=(load)");
301 luaL_checktype(L, 1, LUA_TFUNCTION); 301 luaL_checktype(L, 1, LUA_TFUNCTION);
302 lua_settop(L, 1); 302 lua_settop(L, 1);
303 al.func = luaL_ref(L, LUA_REGISTRYINDEX); 303 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 @@
1/* 1/*
2** $Id: lua.h,v 1.184 2003/10/21 10:58:58 roberto Exp roberto $ 2** $Id: lua.h,v 1.185 2003/11/05 11:59:14 roberto Exp roberto $
3** Lua - An Extensible Extension Language 3** Lua - An Extensible Extension Language
4** Tecgraf: Computer Graphics Technology Group, PUC-Rio, Brazil 4** Tecgraf: Computer Graphics Technology Group, PUC-Rio, Brazil
5** http://www.lua.org mailto:info@lua.org 5** http://www.lua.org mailto:info@lua.org
@@ -258,10 +258,7 @@ LUA_API lua_Alloc lua_getallocf (lua_State *L, void **ud);
258 258
259#define lua_newtable(L) lua_createtable(L, 0, 0) 259#define lua_newtable(L) lua_createtable(L, 0, 0)
260 260
261#define lua_register(L,n,f) \ 261#define lua_register(L,n,f) (lua_pushcfunction(L,f), lua_setglobal(L,n))
262 (lua_pushstring(L, n), \
263 lua_pushcfunction(L, f), \
264 lua_settable(L, LUA_GLOBALSINDEX))
265 262
266#define lua_pushcfunction(L,f) lua_pushcclosure(L, f, 0) 263#define lua_pushcfunction(L,f) lua_pushcclosure(L, f, 0)
267 264