ltable.h
Go to the documentation of this file.
1 /*
2 ** $Id: ltable.h $
3 ** Lua tables (hash)
4 ** See Copyright Notice in lua.h
5 */
6 
7 #ifndef ltable_h
8 #define ltable_h
9 
10 #include "lobject.h"
11 
12 
13 #define gnode(t,i) (&(t)->node[i])
14 #define gval(n) (&(n)->i_val)
15 #define gnext(n) ((n)->u.next)
16 
17 
18 /*
19 ** Clear all bits of fast-access metamethods, which means that the table
20 ** may have any of these metamethods. (First access that fails after the
21 ** clearing will set the bit again.)
22 */
23 #define invalidateTMcache(t) ((t)->flags &= ~maskflags)
24 
25 
26 /* true when 't' is using 'dummynode' as its hash part */
27 #define isdummy(t) ((t)->lastfree == NULL)
28 
29 
30 /* allocated size for hash nodes */
31 #define allocsizenode(t) (isdummy(t) ? 0 : sizenode(t))
32 
33 
34 /* returns the Node, given the value of a table entry */
35 #define nodefromval(v) cast(Node *, (v))
36 
37 
40  TValue *value);
42 LUAI_FUNC const TValue *luaH_getstr (Table *t, TString *key);
43 LUAI_FUNC const TValue *luaH_get (Table *t, const TValue *key);
44 LUAI_FUNC TValue *luaH_newkey (lua_State *L, Table *t, const TValue *key);
45 LUAI_FUNC TValue *luaH_set (lua_State *L, Table *t, const TValue *key);
47 LUAI_FUNC void luaH_resize (lua_State *L, Table *t, unsigned int nasize,
48  unsigned int nhsize);
49 LUAI_FUNC void luaH_resizearray (lua_State *L, Table *t, unsigned int nasize);
50 LUAI_FUNC void luaH_free (lua_State *L, Table *t);
51 LUAI_FUNC int luaH_next (lua_State *L, Table *t, StkId key);
53 LUAI_FUNC unsigned int luaH_realasize (const Table *t);
54 
55 
56 #if defined(LUA_DEBUG)
57 LUAI_FUNC Node *luaH_mainposition (const Table *t, const TValue *key);
58 LUAI_FUNC int luaH_isdummy (const Table *t);
59 #endif
60 
61 
62 #endif
enum MQTTPropertyCodes value
Definition: lobject.h:712
#define LUAI_FUNC
Definition: luaconf.h:322
LUAI_FUNC void luaH_setint(lua_State *L, Table *t, lua_Integer key, TValue *value)
Definition: ltable.c:770
Definition: lobject.h:63
LUAI_FUNC unsigned int luaH_realasize(const Table *t)
Definition: ltable.c:209
LUA_INTEGER lua_Integer
Definition: lua.h:94
LUAI_FUNC int luaH_next(lua_State *L, Table *t, StkId key)
Definition: ltable.c:305
LUAI_FUNC void luaH_free(lua_State *L, Table *t)
Definition: ltable.c:594
LUAI_FUNC TValue * luaH_newkey(lua_State *L, Table *t, const TValue *key)
Definition: ltable.c:621
LUAI_FUNC const TValue * luaH_getint(Table *t, lua_Integer key)
Definition: ltable.c:683
LUA_UNSIGNED lua_Unsigned
Definition: lua.h:97
LUAI_FUNC const TValue * luaH_getshortstr(Table *t, TString *key)
Definition: ltable.c:711
LUAI_FUNC void luaH_resizearray(lua_State *L, Table *t, unsigned int nasize)
Definition: ltable.c:546
LUAI_FUNC const TValue * luaH_getstr(Table *t, TString *key)
Definition: ltable.c:727
LUAI_FUNC TValue * luaH_set(lua_State *L, Table *t, const TValue *key)
Definition: ltable.c:762
Definition: lobject.h:674
LUAI_FUNC void luaH_resize(lua_State *L, Table *t, unsigned int nasize, unsigned int nhsize)
Definition: ltable.c:509
LUAI_FUNC lua_Unsigned luaH_getn(Table *t)
Definition: ltable.c:865
LUAI_FUNC Table * luaH_new(lua_State *L)
Definition: ltable.c:582
LUAI_FUNC const TValue * luaH_get(Table *t, const TValue *key)
Definition: ltable.c:741


plotjuggler
Author(s): Davide Faconti
autogenerated on Sun Dec 6 2020 03:48:09