diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-02-08 20:39:36 -0200 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-02-08 20:39:36 -0200 |
| commit | 87b0e3d477a8d4af32a2a200a2d8cb2c3aaa05a1 (patch) | |
| tree | f887a310dfb777403129a9520af3560fe3b85804 /lbaselib.c | |
| parent | cb50fcf42d9ab2d04f6f28a30a0ca5cc6e58054c (diff) | |
| download | lua-87b0e3d477a8d4af32a2a200a2d8cb2c3aaa05a1.tar.gz lua-87b0e3d477a8d4af32a2a200a2d8cb2c3aaa05a1.tar.bz2 lua-87b0e3d477a8d4af32a2a200a2d8cb2c3aaa05a1.zip | |
no more `lua_istrue' function
Diffstat (limited to 'lbaselib.c')
| -rw-r--r-- | lbaselib.c | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -264,7 +264,7 @@ static int luaB_loadfile (lua_State *L) { | |||
| 264 | 264 | ||
| 265 | static int luaB_assert (lua_State *L) { | 265 | static int luaB_assert (lua_State *L) { |
| 266 | luaL_check_any(L, 1); | 266 | luaL_check_any(L, 1); |
| 267 | if (!lua_istrue(L, 1)) | 267 | if (!lua_toboolean(L, 1)) |
| 268 | luaL_verror(L, "assertion failed! %.90s", luaL_opt_string(L, 2, "")); | 268 | luaL_verror(L, "assertion failed! %.90s", luaL_opt_string(L, 2, "")); |
| 269 | lua_settop(L, 1); | 269 | lua_settop(L, 1); |
| 270 | return 1; | 270 | return 1; |
| @@ -569,7 +569,7 @@ static int sort_comp (lua_State *L, int a, int b) { | |||
| 569 | lua_pushvalue(L, a-1); /* -1 to compensate function */ | 569 | lua_pushvalue(L, a-1); /* -1 to compensate function */ |
| 570 | lua_pushvalue(L, b-2); /* -2 to compensate function and `a' */ | 570 | lua_pushvalue(L, b-2); /* -2 to compensate function and `a' */ |
| 571 | lua_rawcall(L, 2, 1); | 571 | lua_rawcall(L, 2, 1); |
| 572 | res = lua_istrue(L, -1); | 572 | res = lua_toboolean(L, -1); |
| 573 | lua_pop(L, 1); | 573 | lua_pop(L, 1); |
| 574 | return res; | 574 | return res; |
| 575 | } | 575 | } |
