diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-10-26 15:33:30 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-10-26 15:33:30 -0200 |
commit | 070204300ce44e7e415b299394d51d2d105a39d1 (patch) | |
tree | 849da757b6f07b33fc280ba6e1e0d42db6558895 /ltests.c | |
parent | 21aa7e55f2333e57b972aa4ef2c5e2785d609578 (diff) | |
download | lua-070204300ce44e7e415b299394d51d2d105a39d1.tar.gz lua-070204300ce44e7e415b299394d51d2d105a39d1.tar.bz2 lua-070204300ce44e7e415b299394d51d2d105a39d1.zip |
more consistent names for auxlib functions
Diffstat (limited to 'ltests.c')
-rw-r--r-- | ltests.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltests.c,v 1.93 2001/10/17 21:12:57 roberto Exp $ | 2 | ** $Id: ltests.c,v 1.94 2001/10/25 19:14:14 roberto Exp $ |
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 | */ |
@@ -247,7 +247,7 @@ static int hash_query (lua_State *L) { | |||
247 | else { | 247 | else { |
248 | TObject *o = luaA_index(L, 1); | 248 | TObject *o = luaA_index(L, 1); |
249 | Table *t; | 249 | Table *t; |
250 | luaL_checktype(L, 2, LUA_TTABLE); | 250 | luaL_check_rawtype(L, 2, LUA_TTABLE); |
251 | t = hvalue(luaA_index(L, 2)); | 251 | t = hvalue(luaA_index(L, 2)); |
252 | lua_pushnumber(L, luaH_mainposition(t, o) - t->node); | 252 | lua_pushnumber(L, luaH_mainposition(t, o) - t->node); |
253 | } | 253 | } |
@@ -258,7 +258,7 @@ static int hash_query (lua_State *L) { | |||
258 | static int table_query (lua_State *L) { | 258 | static int table_query (lua_State *L) { |
259 | const Table *t; | 259 | const Table *t; |
260 | int i = luaL_opt_int(L, 2, -1); | 260 | int i = luaL_opt_int(L, 2, -1); |
261 | luaL_checktype(L, 1, LUA_TTABLE); | 261 | luaL_check_rawtype(L, 1, LUA_TTABLE); |
262 | t = hvalue(luaA_index(L, 1)); | 262 | t = hvalue(luaA_index(L, 1)); |
263 | if (i == -1) { | 263 | if (i == -1) { |
264 | lua_pushnumber(L, t->sizearray); | 264 | lua_pushnumber(L, t->sizearray); |
@@ -312,7 +312,7 @@ static int string_query (lua_State *L) { | |||
312 | 312 | ||
313 | static int tref (lua_State *L) { | 313 | static int tref (lua_State *L) { |
314 | int level = lua_gettop(L); | 314 | int level = lua_gettop(L); |
315 | luaL_checkany(L, 1); | 315 | luaL_check_any(L, 1); |
316 | lua_pushvalue(L, 1); | 316 | lua_pushvalue(L, 1); |
317 | lua_pushnumber(L, lua_ref(L, 1)); | 317 | lua_pushnumber(L, lua_ref(L, 1)); |
318 | assert(lua_gettop(L) == level+1); /* +1 for result */ | 318 | assert(lua_gettop(L) == level+1); /* +1 for result */ |
@@ -346,14 +346,14 @@ static int newuserdatabox (lua_State *L) { | |||
346 | } | 346 | } |
347 | 347 | ||
348 | static int settag (lua_State *L) { | 348 | static int settag (lua_State *L) { |
349 | luaL_checkany(L, 1); | 349 | luaL_check_any(L, 1); |
350 | lua_pushvalue(L, 1); /* push value */ | 350 | lua_pushvalue(L, 1); /* push value */ |
351 | lua_settag(L, luaL_check_int(L, 2)); | 351 | lua_settag(L, luaL_check_int(L, 2)); |
352 | return 1; /* return value */ | 352 | return 1; /* return value */ |
353 | } | 353 | } |
354 | 354 | ||
355 | static int udataval (lua_State *L) { | 355 | static int udataval (lua_State *L) { |
356 | luaL_checktype(L, 1, LUA_TUSERDATA); | 356 | luaL_check_rawtype(L, 1, LUA_TUSERDATA); |
357 | lua_pushnumber(L, cast(int, lua_touserdata(L, 1))); | 357 | lua_pushnumber(L, cast(int, lua_touserdata(L, 1))); |
358 | return 1; | 358 | return 1; |
359 | } | 359 | } |
@@ -438,7 +438,7 @@ static int doremote (lua_State *L) { | |||
438 | static int settagmethod (lua_State *L) { | 438 | static int settagmethod (lua_State *L) { |
439 | int tag = luaL_check_int(L, 1); | 439 | int tag = luaL_check_int(L, 1); |
440 | const l_char *event = luaL_check_string(L, 2); | 440 | const l_char *event = luaL_check_string(L, 2); |
441 | luaL_checkany(L, 3); | 441 | luaL_check_any(L, 3); |
442 | lua_gettagmethod(L, tag, event); | 442 | lua_gettagmethod(L, tag, event); |
443 | lua_pushvalue(L, 3); | 443 | lua_pushvalue(L, 3); |
444 | lua_settagmethod(L, tag, event); | 444 | lua_settagmethod(L, tag, event); |