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 /ltablib.c | |
parent | 69906cb56f1fbc20417f0ca973b3e97ef0c4bc5a (diff) | |
download | lua-78c507b7b83a85c106b619ce2050725a80627a25.tar.gz lua-78c507b7b83a85c106b619ce2050725a80627a25.tar.bz2 lua-78c507b7b83a85c106b619ce2050725a80627a25.zip |
`lua_upcall' -> `lua_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.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; |