From 9aff171f3bf0125314a29a5ca952470b2d83708e Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Tue, 11 Dec 2001 20:48:44 -0200 Subject: new type `boolean' --- ltable.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'ltable.c') diff --git a/ltable.c b/ltable.c index 06e42a79..ac721f41 100644 --- a/ltable.c +++ b/ltable.c @@ -52,6 +52,7 @@ #define hashnum(t,n) \ (node(t, lmod(cast(lu_hash, cast(ls_hash, n)), sizenode(t)))) #define hashstr(t,str) (node(t, lmod((str)->tsv.hash, sizenode(t)))) +#define hashboolean(t,p) (node(t, lmod(p, sizenode(t)))) #define hashpointer(t,p) (node(t, lmod(IntPoint(p), sizenode(t)))) @@ -65,6 +66,8 @@ Node *luaH_mainposition (const Table *t, const TObject *key) { return hashnum(t, nvalue(key)); case LUA_TSTRING: return hashstr(t, tsvalue(key)); + case LUA_TBOOLEAN: + return hashboolean(t, bvalue(key)); default: /* all other types are hashed as (void *) */ return hashpointer(t, tsvalue(key)); } -- cgit v1.2.3-55-g6feb