diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2013-08-30 12:49:41 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2013-08-30 12:49:41 -0300 |
commit | c23f7053495934bc7fbce7328af1e7f03f248de1 (patch) | |
tree | 468daa5084acc92a1453d67048568a56ce875d81 /ltable.h | |
parent | 42cf5f8214edf45400c7e4abd6faef27cf424801 (diff) | |
download | lua-c23f7053495934bc7fbce7328af1e7f03f248de1.tar.gz lua-c23f7053495934bc7fbce7328af1e7f03f248de1.tar.bz2 lua-c23f7053495934bc7fbce7328af1e7f03f248de1.zip |
BUG: GC can collect a long string still in use during parser
Diffstat (limited to 'ltable.h')
-rw-r--r-- | ltable.h | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltable.h,v 2.16 2011/08/17 20:26:47 roberto Exp $ | 2 | ** $Id: ltable.h,v 2.16.1.1 2013/04/12 18:48:47 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 | */ |
@@ -17,6 +17,10 @@ | |||
17 | 17 | ||
18 | #define invalidateTMcache(t) ((t)->flags = 0) | 18 | #define invalidateTMcache(t) ((t)->flags = 0) |
19 | 19 | ||
20 | /* returns the key, given the value of a table entry */ | ||
21 | #define keyfromval(v) \ | ||
22 | (gkey(cast(Node *, cast(char *, (v)) - offsetof(Node, i_val)))) | ||
23 | |||
20 | 24 | ||
21 | LUAI_FUNC const TValue *luaH_getint (Table *t, int key); | 25 | LUAI_FUNC const TValue *luaH_getint (Table *t, int key); |
22 | LUAI_FUNC void luaH_setint (lua_State *L, Table *t, int key, TValue *value); | 26 | LUAI_FUNC void luaH_setint (lua_State *L, Table *t, int key, TValue *value); |