lua

A copy of the Lua development repository
Log | Files | Refs | README

commit 163f58dac53330b8ace2421d838b5cf399bc4bf9
parent dcee7d2fe035067f7042057022089c4b73be3ed7
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date:   Mon, 11 Feb 2008 17:03:53 -0200

in 'testC', booleans should be represented by booean values

Diffstat:
Mltests.c | 22+++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/ltests.c b/ltests.c @@ -1,5 +1,5 @@ /* -** $Id: ltests.c,v 2.44 2007/11/12 16:28:45 roberto Exp roberto $ +** $Id: ltests.c,v 2.45 2008/02/11 18:04:26 roberto Exp roberto $ ** Internal Module for Debugging of the Lua Implementation ** See Copyright Notice in lua.h */ @@ -861,31 +861,31 @@ static int testC (lua_State *L) { const char *inst = getname; if EQ("") return 0; else if EQ("isnumber") { - lua_pushinteger(L1, lua_isnumber(L1, getindex)); + lua_pushboolean(L1, lua_isnumber(L1, getindex)); } else if EQ("isstring") { - lua_pushinteger(L1, lua_isstring(L1, getindex)); + lua_pushboolean(L1, lua_isstring(L1, getindex)); } else if EQ("istable") { - lua_pushinteger(L1, lua_istable(L1, getindex)); + lua_pushboolean(L1, lua_istable(L1, getindex)); } else if EQ("iscfunction") { - lua_pushinteger(L1, lua_iscfunction(L1, getindex)); + lua_pushboolean(L1, lua_iscfunction(L1, getindex)); } else if EQ("isfunction") { - lua_pushinteger(L1, lua_isfunction(L1, getindex)); + lua_pushboolean(L1, lua_isfunction(L1, getindex)); } else if EQ("isuserdata") { - lua_pushinteger(L1, lua_isuserdata(L1, getindex)); + lua_pushboolean(L1, lua_isuserdata(L1, getindex)); } else if EQ("isudataval") { - lua_pushinteger(L1, lua_islightuserdata(L1, getindex)); + lua_pushboolean(L1, lua_islightuserdata(L1, getindex)); } else if EQ("isnil") { - lua_pushinteger(L1, lua_isnil(L1, getindex)); + lua_pushboolean(L1, lua_isnil(L1, getindex)); } else if EQ("isnull") { - lua_pushinteger(L1, lua_isnone(L1, getindex)); + lua_pushboolean(L1, lua_isnone(L1, getindex)); } else if EQ("tonumber") { lua_pushnumber(L1, lua_tonumber(L1, getindex)); @@ -932,7 +932,7 @@ static int testC (lua_State *L) { lua_newuserdata(L1, getnum); } else if EQ("tobool") { - lua_pushinteger(L1, lua_toboolean(L1, getindex)); + lua_pushboolean(L1, lua_toboolean(L1, getindex)); } else if EQ("pushvalue") { lua_pushvalue(L1, getindex);