diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2013-08-30 13:01:37 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2013-08-30 13:01:37 -0300 |
commit | 8ef9e8460e775793f760deb28d0c3d10dda31b49 (patch) | |
tree | 803abce8b7caba6e5f66b26e55f0bc8dcfc881a2 /ltable.h | |
parent | 4f292d753c892e705b6d1796d72758cdd4d49765 (diff) | |
download | lua-8ef9e8460e775793f760deb28d0c3d10dda31b49.tar.gz lua-8ef9e8460e775793f760deb28d0c3d10dda31b49.tar.bz2 lua-8ef9e8460e775793f760deb28d0c3d10dda31b49.zip |
bug (GC can collect long identifier during parser) + change (using
a single constant table for all functions in a chunk)
Diffstat (limited to 'ltable.h')
-rw-r--r-- | ltable.h | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltable.h,v 2.16 2011/08/17 20:26:47 roberto Exp roberto $ | 2 | ** $Id: ltable.h,v 2.17 2013/04/26 15:39:25 roberto Exp roberto $ |
3 | ** Lua tables (hash) | 3 | ** Lua tables (hash) |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -18,6 +18,11 @@ | |||
18 | #define invalidateTMcache(t) ((t)->flags = 0) | 18 | #define invalidateTMcache(t) ((t)->flags = 0) |
19 | 19 | ||
20 | 20 | ||
21 | /* returns the key, given the value of a table entry */ | ||
22 | #define keyfromval(v) \ | ||
23 | (gkey(cast(Node *, cast(char *, (v)) - offsetof(Node, i_val)))) | ||
24 | |||
25 | |||
21 | LUAI_FUNC const TValue *luaH_getint (Table *t, lua_Integer key); | 26 | LUAI_FUNC const TValue *luaH_getint (Table *t, lua_Integer key); |
22 | LUAI_FUNC void luaH_setint (lua_State *L, Table *t, lua_Integer key, | 27 | LUAI_FUNC void luaH_setint (lua_State *L, Table *t, lua_Integer key, |
23 | TValue *value); | 28 | TValue *value); |