diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-06-25 16:18:49 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-06-25 16:18:49 -0300 |
commit | 78c507b7b83a85c106b619ce2050725a80627a25 (patch) | |
tree | a2d2f27f3a98bca084f7430c085fe30763d6108a | |
parent | 69906cb56f1fbc20417f0ca973b3e97ef0c4bc5a (diff) | |
download | lua-78c507b7b83a85c106b619ce2050725a80627a25.tar.gz lua-78c507b7b83a85c106b619ce2050725a80627a25.tar.bz2 lua-78c507b7b83a85c106b619ce2050725a80627a25.zip |
`lua_upcall' -> `lua_call'
-rw-r--r-- | ldblib.c | 4 | ||||
-rw-r--r-- | lstrlib.c | 4 | ||||
-rw-r--r-- | ltablib.c | 8 | ||||
-rw-r--r-- | ltests.c | 4 | ||||
-rw-r--r-- | lua.h | 6 |
5 files changed, 13 insertions, 13 deletions
@@ -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 */ |
@@ -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 |
@@ -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; |
@@ -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; |
@@ -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 | */ |
188 | LUA_API void lua_upcall (lua_State *L, int nargs, int nresults); | 188 | LUA_API void lua_call (lua_State *L, int nargs, int nresults); |
189 | LUA_API int lua_pcall (lua_State *L, int nargs, int nresults); | 189 | LUA_API int lua_pcall (lua_State *L, int nargs, int nresults); |
190 | LUA_API int lua_load (lua_State *L, lua_Chunkreader reader, void *data, | 190 | LUA_API int lua_load (lua_State *L, lua_Chunkreader reader, void *data, |
191 | const char *chunkname); | 191 | const char *chunkname); |