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 /ltablib.c | |
parent | 864c96f36ce8410b03652b1cb9800e4b3c76bcf7 (diff) | |
download | lua-eb3de8768a6b614597f7e5f018fc31a9f52441df.tar.gz lua-eb3de8768a6b614597f7e5f018fc31a9f52441df.tar.bz2 lua-eb3de8768a6b614597f7e5f018fc31a9f52441df.zip |
`rawcall' -> `upcall' (unprotected call)
Diffstat (limited to 'ltablib.c')
-rw-r--r-- | ltablib.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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; |