mirror of
https://github.com/lua/lua
synced 2026-09-29 04:35:58 +03:00
support for light' userdata + simpler support for boxed' udata
This commit is contained in:
parent
f438d00ef3
commit
237969724f
12 changed files with 71 additions and 64 deletions
6
ltable.c
6
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));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue