diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2008-02-11 17:04:16 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2008-02-11 17:04:16 -0200 |
commit | 163f58dac53330b8ace2421d838b5cf399bc4bf9 (patch) | |
tree | 7def9c87085b9c31f4a1ddeffe01aa9043041472 /ltests.c | |
parent | dcee7d2fe035067f7042057022089c4b73be3ed7 (diff) | |
download | lua-163f58dac53330b8ace2421d838b5cf399bc4bf9.tar.gz lua-163f58dac53330b8ace2421d838b5cf399bc4bf9.tar.bz2 lua-163f58dac53330b8ace2421d838b5cf399bc4bf9.zip |
in 'testC', booleans should be represented by booean values
Diffstat (limited to 'ltests.c')
-rw-r--r-- | ltests.c | 22 |
1 files changed, 11 insertions, 11 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltests.c,v 2.44 2007/11/12 16:28:45 roberto Exp roberto $ | 2 | ** $Id: ltests.c,v 2.45 2008/02/11 18:04:26 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 | */ |
@@ -861,31 +861,31 @@ static int testC (lua_State *L) { | |||
861 | const char *inst = getname; | 861 | const char *inst = getname; |
862 | if EQ("") return 0; | 862 | if EQ("") return 0; |
863 | else if EQ("isnumber") { | 863 | else if EQ("isnumber") { |
864 | lua_pushinteger(L1, lua_isnumber(L1, getindex)); | 864 | lua_pushboolean(L1, lua_isnumber(L1, getindex)); |
865 | } | 865 | } |
866 | else if EQ("isstring") { | 866 | else if EQ("isstring") { |
867 | lua_pushinteger(L1, lua_isstring(L1, getindex)); | 867 | lua_pushboolean(L1, lua_isstring(L1, getindex)); |
868 | } | 868 | } |
869 | else if EQ("istable") { | 869 | else if EQ("istable") { |
870 | lua_pushinteger(L1, lua_istable(L1, getindex)); | 870 | lua_pushboolean(L1, lua_istable(L1, getindex)); |
871 | } | 871 | } |
872 | else if EQ("iscfunction") { | 872 | else if EQ("iscfunction") { |
873 | lua_pushinteger(L1, lua_iscfunction(L1, getindex)); | 873 | lua_pushboolean(L1, lua_iscfunction(L1, getindex)); |
874 | } | 874 | } |
875 | else if EQ("isfunction") { | 875 | else if EQ("isfunction") { |
876 | lua_pushinteger(L1, lua_isfunction(L1, getindex)); | 876 | lua_pushboolean(L1, lua_isfunction(L1, getindex)); |
877 | } | 877 | } |
878 | else if EQ("isuserdata") { | 878 | else if EQ("isuserdata") { |
879 | lua_pushinteger(L1, lua_isuserdata(L1, getindex)); | 879 | lua_pushboolean(L1, lua_isuserdata(L1, getindex)); |
880 | } | 880 | } |
881 | else if EQ("isudataval") { | 881 | else if EQ("isudataval") { |
882 | lua_pushinteger(L1, lua_islightuserdata(L1, getindex)); | 882 | lua_pushboolean(L1, lua_islightuserdata(L1, getindex)); |
883 | } | 883 | } |
884 | else if EQ("isnil") { | 884 | else if EQ("isnil") { |
885 | lua_pushinteger(L1, lua_isnil(L1, getindex)); | 885 | lua_pushboolean(L1, lua_isnil(L1, getindex)); |
886 | } | 886 | } |
887 | else if EQ("isnull") { | 887 | else if EQ("isnull") { |
888 | lua_pushinteger(L1, lua_isnone(L1, getindex)); | 888 | lua_pushboolean(L1, lua_isnone(L1, getindex)); |
889 | } | 889 | } |
890 | else if EQ("tonumber") { | 890 | else if EQ("tonumber") { |
891 | lua_pushnumber(L1, lua_tonumber(L1, getindex)); | 891 | lua_pushnumber(L1, lua_tonumber(L1, getindex)); |
@@ -932,7 +932,7 @@ static int testC (lua_State *L) { | |||
932 | lua_newuserdata(L1, getnum); | 932 | lua_newuserdata(L1, getnum); |
933 | } | 933 | } |
934 | else if EQ("tobool") { | 934 | else if EQ("tobool") { |
935 | lua_pushinteger(L1, lua_toboolean(L1, getindex)); | 935 | lua_pushboolean(L1, lua_toboolean(L1, getindex)); |
936 | } | 936 | } |
937 | else if EQ("pushvalue") { | 937 | else if EQ("pushvalue") { |
938 | lua_pushvalue(L1, getindex); | 938 | lua_pushvalue(L1, getindex); |