simpler definition for 'setobj' (trust the compiler for the assignment)

This commit is contained in:
Roberto Ierusalimschy
2014-07-29 13:22:24 -03:00
parent 3ccbae84d2
commit 07c7fdb9df
4 changed files with 23 additions and 11 deletions

View File

@@ -1,5 +1,5 @@
/*
** $Id: ltable.h,v 2.17 2013/04/26 15:39:25 roberto Exp roberto $
** $Id: ltable.h,v 2.18 2013/08/30 16:01:37 roberto Exp roberto $
** Lua tables (hash)
** See Copyright Notice in lua.h
*/
@@ -11,10 +11,15 @@
#define gnode(t,i) (&(t)->node[i])
#define gkey(n) (&(n)->i_key.tvk)
#define gval(n) (&(n)->i_val)
#define gnext(n) ((n)->i_key.nk.next)
/* 'const' to avoid wrong writings that can mess up field 'next' */
#define gkey(n) cast(const TValue*, (&(n)->i_key.tvk))
#define wgkey(n) (&(n)->i_key.nk)
#define invalidateTMcache(t) ((t)->flags = 0)