summaryrefslogtreecommitdiff
path: root/libs/liblua/src/ltable.h
diff options
context:
space:
mode:
Diffstat (limited to 'libs/liblua/src/ltable.h')
-rw-r--r--libs/liblua/src/ltable.h19
1 files changed, 5 insertions, 14 deletions
diff --git a/libs/liblua/src/ltable.h b/libs/liblua/src/ltable.h
index 92db0ac7bf..ebd7f8ec3e 100644
--- a/libs/liblua/src/ltable.h
+++ b/libs/liblua/src/ltable.h
@@ -1,5 +1,5 @@
/*
-** $Id: ltable.h,v 2.23.1.2 2018/05/24 19:39:05 roberto Exp $
+** $Id: ltable.h $
** Lua tables (hash)
** See Copyright Notice in lua.h
*/
@@ -12,18 +12,9 @@
#define gnode(t,i) (&(t)->node[i])
#define gval(n) (&(n)->i_val)
-#define gnext(n) ((n)->i_key.nk.next)
+#define gnext(n) ((n)->u.next)
-/* 'const' to avoid wrong writings that can mess up field 'next' */
-#define gkey(n) cast(const TValue*, (&(n)->i_key.tvk))
-
-/*
-** writable version of 'gkey'; allows updates to individual fields,
-** but not to the whole (which has incompatible type)
-*/
-#define wgkey(n) (&(n)->i_key.nk)
-
#define invalidateTMcache(t) ((t)->flags = 0)
@@ -35,9 +26,8 @@
#define allocsizenode(t) (isdummy(t) ? 0 : sizenode(t))
-/* returns the key, given the value of a table entry */
-#define keyfromval(v) \
- (gkey(cast(Node *, cast(char *, (v)) - offsetof(Node, i_val))))
+/* returns the Node, given the value of a table entry */
+#define nodefromval(v) cast(Node *, (v))
LUAI_FUNC const TValue *luaH_getint (Table *t, lua_Integer key);
@@ -55,6 +45,7 @@ LUAI_FUNC void luaH_resizearray (lua_State *L, Table *t, unsigned int nasize);
LUAI_FUNC void luaH_free (lua_State *L, Table *t);
LUAI_FUNC int luaH_next (lua_State *L, Table *t, StkId key);
LUAI_FUNC lua_Unsigned luaH_getn (Table *t);
+LUAI_FUNC unsigned int luaH_realasize (const Table *t);
#if defined(LUA_DEBUG)