aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-06-25 16:18:49 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-06-25 16:18:49 -0300
commit78c507b7b83a85c106b619ce2050725a80627a25 (patch)
treea2d2f27f3a98bca084f7430c085fe30763d6108a
parent69906cb56f1fbc20417f0ca973b3e97ef0c4bc5a (diff)
downloadlua-78c507b7b83a85c106b619ce2050725a80627a25.tar.gz
lua-78c507b7b83a85c106b619ce2050725a80627a25.tar.bz2
lua-78c507b7b83a85c106b619ce2050725a80627a25.zip
`lua_upcall' -> `lua_call'
-rw-r--r--ldblib.c4
-rw-r--r--lstrlib.c4
-rw-r--r--ltablib.c8
-rw-r--r--ltests.c4
-rw-r--r--lua.h6
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 @@
1/* 1/*
2** $Id: ldblib.c,v 1.59 2002/06/18 17:10:43 roberto Exp roberto $ 2** $Id: ldblib.c,v 1.60 2002/06/18 17:42:52 roberto Exp roberto $
3** Interface from Lua to its debug API 3** Interface from Lua to its debug API
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -117,7 +117,7 @@ static void hookf (lua_State *L, void *key) {
117 lua_rawget(L, LUA_REGISTRYINDEX); 117 lua_rawget(L, LUA_REGISTRYINDEX);
118 if (lua_isfunction(L, -1)) { 118 if (lua_isfunction(L, -1)) {
119 lua_pushvalue(L, -2); /* original argument (below function) */ 119 lua_pushvalue(L, -2); /* original argument (below function) */
120 lua_upcall(L, 1, 0); 120 lua_call(L, 1, 0);
121 } 121 }
122 else 122 else
123 lua_pop(L, 1); /* pop result from gettable */ 123 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 @@
1/* 1/*
2** $Id: lstrlib.c,v 1.84 2002/06/13 13:44:50 roberto Exp roberto $ 2** $Id: lstrlib.c,v 1.85 2002/06/18 15:16:18 roberto Exp roberto $
3** Standard library for string operations and pattern-matching 3** Standard library for string operations and pattern-matching
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -548,7 +548,7 @@ static void add_s (MatchState *ms, luaL_Buffer *b,
548 int n; 548 int n;
549 lua_pushvalue(L, 3); 549 lua_pushvalue(L, 3);
550 n = push_captures(ms, s, e); 550 n = push_captures(ms, s, e);
551 lua_upcall(L, n, 1); 551 lua_call(L, n, 1);
552 if (lua_isstring(L, -1)) 552 if (lua_isstring(L, -1))
553 luaL_addvalue(b); /* add return to accumulated result */ 553 luaL_addvalue(b); /* add return to accumulated result */
554 else 554 else
diff --git a/ltablib.c b/ltablib.c
index c28bb5bf..d1d56748 100644
--- a/ltablib.c
+++ b/ltablib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltablib.c,v 1.6 2002/06/13 13:44:50 roberto Exp roberto $ 2** $Id: ltablib.c,v 1.7 2002/06/18 15:16:18 roberto Exp roberto $
3** Library for Table Manipulation 3** Library for Table Manipulation
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -25,7 +25,7 @@ static int luaB_foreachi (lua_State *L) {
25 lua_pushvalue(L, 2); /* function */ 25 lua_pushvalue(L, 2); /* function */
26 lua_pushnumber(L, i); /* 1st argument */ 26 lua_pushnumber(L, i); /* 1st argument */
27 lua_rawgeti(L, 1, i); /* 2nd argument */ 27 lua_rawgeti(L, 1, i); /* 2nd argument */
28 lua_upcall(L, 2, 1); 28 lua_call(L, 2, 1);
29 if (!lua_isnil(L, -1)) 29 if (!lua_isnil(L, -1))
30 return 1; 30 return 1;
31 lua_pop(L, 1); /* remove nil result */ 31 lua_pop(L, 1); /* remove nil result */
@@ -44,7 +44,7 @@ static int luaB_foreach (lua_State *L) {
44 lua_pushvalue(L, 2); /* function */ 44 lua_pushvalue(L, 2); /* function */
45 lua_pushvalue(L, -3); /* key */ 45 lua_pushvalue(L, -3); /* key */
46 lua_pushvalue(L, -3); /* value */ 46 lua_pushvalue(L, -3); /* value */
47 lua_upcall(L, 2, 1); 47 lua_call(L, 2, 1);
48 if (!lua_isnil(L, -1)) 48 if (!lua_isnil(L, -1))
49 return 1; 49 return 1;
50 lua_pop(L, 2); /* remove value and result */ 50 lua_pop(L, 2); /* remove value and result */
@@ -128,7 +128,7 @@ static int sort_comp (lua_State *L, int a, int b) {
128 lua_pushvalue(L, 2); 128 lua_pushvalue(L, 2);
129 lua_pushvalue(L, a-1); /* -1 to compensate function */ 129 lua_pushvalue(L, a-1); /* -1 to compensate function */
130 lua_pushvalue(L, b-2); /* -2 to compensate function and `a' */ 130 lua_pushvalue(L, b-2); /* -2 to compensate function and `a' */
131 lua_upcall(L, 2, 1); 131 lua_call(L, 2, 1);
132 res = lua_toboolean(L, -1); 132 res = lua_toboolean(L, -1);
133 lua_pop(L, 1); 133 lua_pop(L, 1);
134 return res; 134 return res;
diff --git a/ltests.c b/ltests.c
index 3d702b06..f3e5f9a1 100644
--- a/ltests.c
+++ b/ltests.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltests.c,v 1.126 2002/06/18 15:19:27 roberto Exp roberto $ 2** $Id: ltests.c,v 1.127 2002/06/20 20:40:38 roberto Exp roberto $
3** Internal Module for Debugging of the Lua Implementation 3** Internal Module for Debugging of the Lua Implementation
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -665,7 +665,7 @@ static int testC (lua_State *L) {
665 else if EQ("rawcall") { 665 else if EQ("rawcall") {
666 int narg = getnum; 666 int narg = getnum;
667 int nres = getnum; 667 int nres = getnum;
668 lua_upcall(L, narg, nres); 668 lua_call(L, narg, nres);
669 } 669 }
670 else if EQ("call") { 670 else if EQ("call") {
671 int narg = getnum; 671 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 @@
1/* 1/*
2** $Id: lua.h,v 1.141 2002/06/18 15:19:27 roberto Exp roberto $ 2** $Id: lua.h,v 1.142 2002/06/20 20:41:46 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
@@ -25,7 +25,7 @@
25 25
26 26
27 27
28/* option for multiple returns in `lua_pcall' and `lua_upcall' */ 28/* option for multiple returns in `lua_pcall' and `lua_call' */
29#define LUA_MULTRET (-1) 29#define LUA_MULTRET (-1)
30 30
31 31
@@ -185,7 +185,7 @@ LUA_API int lua_setglobals (lua_State *L, int level);
185/* 185/*
186** `load' and `call' functions (load and run Lua code) 186** `load' and `call' functions (load and run Lua code)
187*/ 187*/
188LUA_API void lua_upcall (lua_State *L, int nargs, int nresults); 188LUA_API void lua_call (lua_State *L, int nargs, int nresults);
189LUA_API int lua_pcall (lua_State *L, int nargs, int nresults); 189LUA_API int lua_pcall (lua_State *L, int nargs, int nresults);
190LUA_API int lua_load (lua_State *L, lua_Chunkreader reader, void *data, 190LUA_API int lua_load (lua_State *L, lua_Chunkreader reader, void *data,
191 const char *chunkname); 191 const char *chunkname);