summaryrefslogtreecommitdiff
path: root/Build/source/libs/lua52/lua-5.2.4/src/ltable.h
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2015-03-11 07:48:18 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2015-03-11 07:48:18 +0000
commitd968be62390458d3c5f47f58517a50f34cc5f6c9 (patch)
tree65ab762830812433c34fb2f2301c6c2929454fe5 /Build/source/libs/lua52/lua-5.2.4/src/ltable.h
parent3b0b3263acb8f019faefec094b4f75ded56b6a9f (diff)
lua 5.2.4
git-svn-id: svn://tug.org/texlive/trunk@36481 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/lua52/lua-5.2.4/src/ltable.h')
-rw-r--r--Build/source/libs/lua52/lua-5.2.4/src/ltable.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/Build/source/libs/lua52/lua-5.2.4/src/ltable.h b/Build/source/libs/lua52/lua-5.2.4/src/ltable.h
new file mode 100644
index 00000000000..d69449b2b86
--- /dev/null
+++ b/Build/source/libs/lua52/lua-5.2.4/src/ltable.h
@@ -0,0 +1,45 @@
+/*
+** $Id: ltable.h,v 2.16.1.2 2013/08/30 15:49:41 roberto Exp $
+** Lua tables (hash)
+** See Copyright Notice in lua.h
+*/
+
+#ifndef ltable_h
+#define ltable_h
+
+#include "lobject.h"
+
+
+#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)
+
+#define invalidateTMcache(t) ((t)->flags = 0)
+
+/* returns the key, given the value of a table entry */
+#define keyfromval(v) \
+ (gkey(cast(Node *, cast(char *, (v)) - offsetof(Node, i_val))))
+
+
+LUAI_FUNC const TValue *luaH_getint (Table *t, int key);
+LUAI_FUNC void luaH_setint (lua_State *L, Table *t, int key, TValue *value);
+LUAI_FUNC const TValue *luaH_getstr (Table *t, TString *key);
+LUAI_FUNC const TValue *luaH_get (Table *t, const TValue *key);
+LUAI_FUNC TValue *luaH_newkey (lua_State *L, Table *t, const TValue *key);
+LUAI_FUNC TValue *luaH_set (lua_State *L, Table *t, const TValue *key);
+LUAI_FUNC Table *luaH_new (lua_State *L);
+LUAI_FUNC void luaH_resize (lua_State *L, Table *t, int nasize, int nhsize);
+LUAI_FUNC void luaH_resizearray (lua_State *L, Table *t, 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 int luaH_getn (Table *t);
+
+
+#if defined(LUA_DEBUG)
+LUAI_FUNC Node *luaH_mainposition (const Table *t, const TValue *key);
+LUAI_FUNC int luaH_isdummy (Node *n);
+#endif
+
+
+#endif