diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-07-29 13:22:24 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-07-29 13:22:24 -0300 |
| commit | 07c7fdb9df82c7fc4ae501e21262f781df4ae5e5 (patch) | |
| tree | d270600a7d359461f68b1d1e80e7ec4182d405ca /ltable.h | |
| parent | 3ccbae84d2be8e2978a65bcea15b3fffba7664f5 (diff) | |
| download | lua-07c7fdb9df82c7fc4ae501e21262f781df4ae5e5.tar.gz lua-07c7fdb9df82c7fc4ae501e21262f781df4ae5e5.tar.bz2 lua-07c7fdb9df82c7fc4ae501e21262f781df4ae5e5.zip | |
simpler definition for 'setobj' (trust the compiler for the assignment)
Diffstat (limited to 'ltable.h')
| -rw-r--r-- | ltable.h | 9 |
1 files changed, 7 insertions, 2 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ltable.h,v 2.17 2013/04/26 15:39:25 roberto Exp roberto $ | 2 | ** $Id: ltable.h,v 2.18 2013/08/30 16:01:37 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 | */ |
| @@ -11,10 +11,15 @@ | |||
| 11 | 11 | ||
| 12 | 12 | ||
| 13 | #define gnode(t,i) (&(t)->node[i]) | 13 | #define gnode(t,i) (&(t)->node[i]) |
| 14 | #define gkey(n) (&(n)->i_key.tvk) | ||
| 15 | #define gval(n) (&(n)->i_val) | 14 | #define gval(n) (&(n)->i_val) |
| 16 | #define gnext(n) ((n)->i_key.nk.next) | 15 | #define gnext(n) ((n)->i_key.nk.next) |
| 17 | 16 | ||
| 17 | |||
| 18 | /* 'const' to avoid wrong writings that can mess up field 'next' */ | ||
| 19 | #define gkey(n) cast(const TValue*, (&(n)->i_key.tvk)) | ||
| 20 | |||
| 21 | #define wgkey(n) (&(n)->i_key.nk) | ||
| 22 | |||
| 18 | #define invalidateTMcache(t) ((t)->flags = 0) | 23 | #define invalidateTMcache(t) ((t)->flags = 0) |
| 19 | 24 | ||
| 20 | 25 | ||
