From 78c507b7b83a85c106b619ce2050725a80627a25 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Tue, 25 Jun 2002 16:18:49 -0300 Subject: [PATCH] `lua_upcall' -> `lua_call' --- ldblib.c | 4 ++-- lstrlib.c | 4 ++-- ltablib.c | 8 ++++---- ltests.c | 4 ++-- lua.h | 6 +++--- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/ldblib.c b/ldblib.c index 63602f95..a0601b14 100644 --- a/ldblib.c +++ b/ldblib.c @@ -1,5 +1,5 @@ /* -** $Id: ldblib.c,v 1.59 2002/06/18 17:10:43 roberto Exp roberto $ +** $Id: ldblib.c,v 1.60 2002/06/18 17:42:52 roberto Exp roberto $ ** Interface from Lua to its debug API ** See Copyright Notice in lua.h */ @@ -117,7 +117,7 @@ static void hookf (lua_State *L, void *key) { lua_rawget(L, LUA_REGISTRYINDEX); if (lua_isfunction(L, -1)) { lua_pushvalue(L, -2); /* original argument (below function) */ - lua_upcall(L, 1, 0); + lua_call(L, 1, 0); } else lua_pop(L, 1); /* pop result from gettable */ diff --git a/lstrlib.c b/lstrlib.c index a5a281c0..540c13a0 100644 --- a/lstrlib.c +++ b/lstrlib.c @@ -1,5 +1,5 @@ /* -** $Id: lstrlib.c,v 1.84 2002/06/13 13:44:50 roberto Exp roberto $ +** $Id: lstrlib.c,v 1.85 2002/06/18 15:16:18 roberto Exp roberto $ ** Standard library for string operations and pattern-matching ** See Copyright Notice in lua.h */ @@ -548,7 +548,7 @@ static void add_s (MatchState *ms, luaL_Buffer *b, int n; lua_pushvalue(L, 3); n = push_captures(ms, s, e); - lua_upcall(L, n, 1); + lua_call(L, n, 1); if (lua_isstring(L, -1)) luaL_addvalue(b); /* add return to accumulated result */ else diff --git a/ltablib.c b/ltablib.c index c28bb5bf..d1d56748 100644 --- a/ltablib.c +++ b/ltablib.c @@ -1,5 +1,5 @@ /* -** $Id: ltablib.c,v 1.6 2002/06/13 13:44:50 roberto Exp roberto $ +** $Id: ltablib.c,v 1.7 2002/06/18 15:16:18 roberto Exp roberto $ ** Library for Table Manipulation ** See Copyright Notice in lua.h */ @@ -25,7 +25,7 @@ static int luaB_foreachi (lua_State *L) { lua_pushvalue(L, 2); /* function */ lua_pushnumber(L, i); /* 1st argument */ lua_rawgeti(L, 1, i); /* 2nd argument */ - lua_upcall(L, 2, 1); + lua_call(L, 2, 1); if (!lua_isnil(L, -1)) return 1; lua_pop(L, 1); /* remove nil result */ @@ -44,7 +44,7 @@ static int luaB_foreach (lua_State *L) { lua_pushvalue(L, 2); /* function */ lua_pushvalue(L, -3); /* key */ lua_pushvalue(L, -3); /* value */ - lua_upcall(L, 2, 1); + lua_call(L, 2, 1); if (!lua_isnil(L, -1)) return 1; lua_pop(L, 2); /* remove value and result */ @@ -128,7 +128,7 @@ static int sort_comp (lua_State *L, int a, int b) { lua_pushvalue(L, 2); lua_pushvalue(L, a-1); /* -1 to compensate function */ lua_pushvalue(L, b-2); /* -2 to compensate function and `a' */ - lua_upcall(L, 2, 1); + lua_call(L, 2, 1); res = lua_toboolean(L, -1); lua_pop(L, 1); return res; diff --git a/ltests.c b/ltests.c index 3d702b06..f3e5f9a1 100644 --- a/ltests.c +++ b/ltests.c @@ -1,5 +1,5 @@ /* -** $Id: ltests.c,v 1.126 2002/06/18 15:19:27 roberto Exp roberto $ +** $Id: ltests.c,v 1.127 2002/06/20 20:40:38 roberto Exp roberto $ ** Internal Module for Debugging of the Lua Implementation ** See Copyright Notice in lua.h */ @@ -665,7 +665,7 @@ static int testC (lua_State *L) { else if EQ("rawcall") { int narg = getnum; int nres = getnum; - lua_upcall(L, narg, nres); + lua_call(L, narg, nres); } else if EQ("call") { int narg = getnum; diff --git a/lua.h b/lua.h index a14d00d7..3c650278 100644 --- a/lua.h +++ b/lua.h @@ -1,5 +1,5 @@ /* -** $Id: lua.h,v 1.141 2002/06/18 15:19:27 roberto Exp roberto $ +** $Id: lua.h,v 1.142 2002/06/20 20:41:46 roberto Exp roberto $ ** Lua - An Extensible Extension Language ** Tecgraf: Computer Graphics Technology Group, PUC-Rio, Brazil ** http://www.lua.org mailto:info@lua.org @@ -25,7 +25,7 @@ -/* option for multiple returns in `lua_pcall' and `lua_upcall' */ +/* option for multiple returns in `lua_pcall' and `lua_call' */ #define LUA_MULTRET (-1) @@ -185,7 +185,7 @@ LUA_API int lua_setglobals (lua_State *L, int level); /* ** `load' and `call' functions (load and run Lua code) */ -LUA_API void lua_upcall (lua_State *L, int nargs, int nresults); +LUA_API void lua_call (lua_State *L, int nargs, int nresults); LUA_API int lua_pcall (lua_State *L, int nargs, int nresults); LUA_API int lua_load (lua_State *L, lua_Chunkreader reader, void *data, const char *chunkname);