From 237969724f54eeefee057ae382237c8db54af44e Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 5 Apr 2002 15:54:31 -0300 Subject: support for `light' userdata + simpler support for `boxed' udata --- ltable.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'ltable.c') diff --git a/ltable.c b/ltable.c index d0feafef..c71179d1 100644 --- a/ltable.c +++ b/ltable.c @@ -1,5 +1,5 @@ /* -** $Id: ltable.c,v 1.101 2002/02/14 21:41:08 roberto Exp roberto $ +** $Id: ltable.c,v 1.102 2002/03/18 18:18:35 roberto Exp roberto $ ** Lua tables (hash) ** See Copyright Notice in lua.h */ @@ -73,7 +73,9 @@ Node *luaH_mainposition (const Table *t, const TObject *key) { return hashstr(t, tsvalue(key)); case LUA_TBOOLEAN: return hashboolean(t, bvalue(key)); - default: /* all other types are hashed as (void *) */ + case LUA_TUDATAVAL: + return hashpointer(t, pvalue(key)); + default: /* other types are hashed as (struct *) */ return hashpointer(t, tsvalue(key)); } } -- cgit v1.2.3-55-g6feb