diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-06-13 10:44:50 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-06-13 10:44:50 -0300 |
| commit | eb3de8768a6b614597f7e5f018fc31a9f52441df (patch) | |
| tree | ea6e0e48f6d6d8bccb4c168171bbb13a3bca1c99 | |
| parent | 864c96f36ce8410b03652b1cb9800e4b3c76bcf7 (diff) | |
| download | lua-eb3de8768a6b614597f7e5f018fc31a9f52441df.tar.gz lua-eb3de8768a6b614597f7e5f018fc31a9f52441df.tar.bz2 lua-eb3de8768a6b614597f7e5f018fc31a9f52441df.zip | |
`rawcall' -> `upcall' (unprotected call)
| -rw-r--r-- | lapi.c | 4 | ||||
| -rw-r--r-- | lauxlib.c | 4 | ||||
| -rw-r--r-- | lbaselib.c | 6 | ||||
| -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 |
8 files changed, 20 insertions, 20 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lapi.c,v 1.197 2002/06/12 14:51:31 roberto Exp roberto $ | 2 | ** $Id: lapi.c,v 1.198 2002/06/13 13:39:55 roberto Exp roberto $ |
| 3 | ** Lua API | 3 | ** Lua API |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -555,7 +555,7 @@ LUA_API void lua_setmetatable (lua_State *L, int objindex) { | |||
| 555 | ** `load' and `call' functions (run Lua code) | 555 | ** `load' and `call' functions (run Lua code) |
| 556 | */ | 556 | */ |
| 557 | 557 | ||
| 558 | LUA_API void lua_rawcall (lua_State *L, int nargs, int nresults) { | 558 | LUA_API void lua_upcall (lua_State *L, int nargs, int nresults) { |
| 559 | StkId func; | 559 | StkId func; |
| 560 | lua_lock(L); | 560 | lua_lock(L); |
| 561 | api_checknelems(L, nargs+1); | 561 | api_checknelems(L, nargs+1); |
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lauxlib.c,v 1.72 2002/06/03 20:11:41 roberto Exp roberto $ | 2 | ** $Id: lauxlib.c,v 1.73 2002/06/05 16:59:37 roberto Exp roberto $ |
| 3 | ** Auxiliary functions for building Lua libraries | 3 | ** Auxiliary functions for building Lua libraries |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -150,7 +150,7 @@ LUALIB_API int luaL_callmeta (lua_State *L, int obj, const char *event) { | |||
| 150 | return 0; | 150 | return 0; |
| 151 | } | 151 | } |
| 152 | lua_pushvalue(L, obj); | 152 | lua_pushvalue(L, obj); |
| 153 | lua_rawcall(L, 1, 1); | 153 | lua_upcall(L, 1, 1); |
| 154 | return 1; | 154 | return 1; |
| 155 | } | 155 | } |
| 156 | 156 | ||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lbaselib.c,v 1.79 2002/06/06 12:39:48 roberto Exp roberto $ | 2 | ** $Id: lbaselib.c,v 1.80 2002/06/13 13:39:55 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 | */ |
| @@ -34,7 +34,7 @@ static int luaB_print (lua_State *L) { | |||
| 34 | const char *s; | 34 | const char *s; |
| 35 | lua_pushvalue(L, -1); /* function to be called */ | 35 | lua_pushvalue(L, -1); /* function to be called */ |
| 36 | lua_pushvalue(L, i); /* value to print */ | 36 | lua_pushvalue(L, i); /* value to print */ |
| 37 | lua_rawcall(L, 1, 1); | 37 | lua_upcall(L, 1, 1); |
| 38 | s = lua_tostring(L, -1); /* get result */ | 38 | s = lua_tostring(L, -1); /* get result */ |
| 39 | if (s == NULL) | 39 | if (s == NULL) |
| 40 | return luaL_verror(L, "`tostring' must return a string to `print'"); | 40 | return luaL_verror(L, "`tostring' must return a string to `print'"); |
| @@ -378,7 +378,7 @@ static int luaB_require (lua_State *L) { | |||
| 378 | } | 378 | } |
| 379 | switch (status) { | 379 | switch (status) { |
| 380 | case 0: { | 380 | case 0: { |
| 381 | lua_rawcall(L, 0, 0); /* run loaded module */ | 381 | lua_upcall(L, 0, 0); /* run loaded module */ |
| 382 | lua_pushvalue(L, 1); | 382 | lua_pushvalue(L, 1); |
| 383 | lua_pushboolean(L, 1); | 383 | lua_pushboolean(L, 1); |
| 384 | lua_settable(L, 2); /* mark it as loaded */ | 384 | lua_settable(L, 2); /* mark it as loaded */ |
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ldblib.c,v 1.55 2002/06/05 17:24:04 roberto Exp roberto $ | 2 | ** $Id: ldblib.c,v 1.56 2002/06/06 12:40:36 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_rawcall(L, 1, 0); | 120 | lua_upcall(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.82 2002/05/06 19:05:10 roberto Exp roberto $ | 2 | ** $Id: lstrlib.c,v 1.83 2002/06/05 17:24:04 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_rawcall(L, n, 1); | 551 | lua_upcall(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.4 2002/06/05 16:59:21 roberto Exp roberto $ | 2 | ** $Id: ltablib.c,v 1.5 2002/06/05 17:24:04 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_rawcall(L, 2, 1); | 28 | lua_upcall(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_rawcall(L, 2, 1); | 47 | lua_upcall(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_rawcall(L, 2, 1); | 131 | lua_upcall(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.123 2002/06/03 20:11:41 roberto Exp roberto $ | 2 | ** $Id: ltests.c,v 1.124 2002/06/11 16:23:47 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 | */ |
| @@ -634,7 +634,7 @@ static int testC (lua_State *L) { | |||
| 634 | else if EQ("rawcall") { | 634 | else if EQ("rawcall") { |
| 635 | int narg = getnum; | 635 | int narg = getnum; |
| 636 | int nres = getnum; | 636 | int nres = getnum; |
| 637 | lua_rawcall(L, narg, nres); | 637 | lua_upcall(L, narg, nres); |
| 638 | } | 638 | } |
| 639 | else if EQ("call") { | 639 | else if EQ("call") { |
| 640 | int narg = getnum; | 640 | int narg = getnum; |
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lua.h,v 1.138 2002/06/06 12:40:22 roberto Exp roberto $ | 2 | ** $Id: lua.h,v 1.139 2002/06/13 13:39:55 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_rawcall' */ | 28 | /* option for multiple returns in `lua_pcall' and `lua_upcall' */ |
| 29 | #define LUA_MULTRET (-1) | 29 | #define LUA_MULTRET (-1) |
| 30 | 30 | ||
| 31 | 31 | ||
| @@ -179,7 +179,7 @@ LUA_API void lua_setmetatable (lua_State *L, int objindex); | |||
| 179 | /* | 179 | /* |
| 180 | ** `load' and `call' functions (load and run Lua code) | 180 | ** `load' and `call' functions (load and run Lua code) |
| 181 | */ | 181 | */ |
| 182 | LUA_API void lua_rawcall (lua_State *L, int nargs, int nresults); | 182 | LUA_API void lua_upcall (lua_State *L, int nargs, int nresults); |
| 183 | LUA_API int lua_pcall (lua_State *L, int nargs, int nresults, int errf); | 183 | LUA_API int lua_pcall (lua_State *L, int nargs, int nresults, int errf); |
| 184 | LUA_API int lua_load (lua_State *L, lua_Chunkreader reader, void *data, | 184 | LUA_API int lua_load (lua_State *L, lua_Chunkreader reader, void *data, |
| 185 | const char *chunkname); | 185 | const char *chunkname); |
