RetroArch
ltable.h
Go to the documentation of this file.
1 /*
2 ** $Id: ltable.h,v 2.23.1.2 2018/05/24 19:39:05 roberto Exp $
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)->i_key.nk.next)
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 /*
22 ** writable version of 'gkey'; allows updates to individual fields,
23 ** but not to the whole (which has incompatible type)
24 */
25 #define wgkey(n) (&(n)->i_key.nk)
26 
27 #define invalidateTMcache(t) ((t)->flags = 0)
28 
29 
30 /* true when 't' is using 'dummynode' as its hash part */
31 #define isdummy(t) ((t)->lastfree == NULL)
32 
33 
34 /* allocated size for hash nodes */
35 #define allocsizenode(t) (isdummy(t) ? 0 : sizenode(t))
36 
37 
38 /* returns the key, given the value of a table entry */
39 #define keyfromval(v) \
40  (gkey(cast(Node *, cast(char *, (v)) - offsetof(Node, i_val))))
41 
42 
45  TValue *value);
47 LUAI_FUNC const TValue *luaH_getstr (Table *t, TString *key);
48 LUAI_FUNC const TValue *luaH_get (Table *t, const TValue *key);
50 LUAI_FUNC TValue *luaH_set (lua_State *L, Table *t, const TValue *key);
52 LUAI_FUNC void luaH_resize (lua_State *L, Table *t, unsigned int nasize,
53  unsigned int nhsize);
54 LUAI_FUNC void luaH_resizearray (lua_State *L, Table *t, unsigned int nasize);
56 LUAI_FUNC int luaH_next (lua_State *L, Table *t, StkId key);
58 
59 
60 #if defined(LUA_DEBUG)
61 LUAI_FUNC Node *luaH_mainposition (const Table *t, const TValue *key);
62 LUAI_FUNC int luaH_isdummy (const Table *t);
63 #endif
64 
65 
66 #endif
LUAI_FUNC lua_Unsigned luaH_getn(Table *t)
Definition: ltable.c:660
Definition: lobject.h:113
LUAI_FUNC TValue * luaH_newkey(lua_State *L, Table *t, const TValue *key)
Definition: ltable.c:461
LUAI_FUNC TValue * luaH_set(lua_State *L, Table *t, const TValue *key)
Definition: ltable.c:610
LUAI_FUNC int luaH_next(lua_State *L, Table *t, StkId key)
Definition: ltable.c:186
LUAI_FUNC void luaH_resize(lua_State *L, Table *t, unsigned int nasize, unsigned int nhsize)
Definition: ltable.c:347
GLdouble GLdouble t
Definition: glext.h:6398
#define LUAI_FUNC
Definition: luaconf.h:282
LUAI_FUNC const TValue * luaH_get(Table *t, const TValue *key)
Definition: ltable.c:589
LUA_INTEGER lua_Integer
Definition: lua.h:93
LUAI_FUNC void luaH_resizearray(lua_State *L, Table *t, unsigned int nasize)
Definition: ltable.c:387
LUAI_FUNC const TValue * luaH_getint(Table *t, lua_Integer key)
Definition: ltable.c:516
LUAI_FUNC Table * luaH_new(lua_State *L)
Definition: ltable.c:421
Definition: lobject.h:491
LUAI_FUNC void luaH_setint(lua_State *L, Table *t, lua_Integer key, TValue *value)
Definition: ltable.c:618
LUAI_FUNC void luaH_free(lua_State *L, Table *t)
Definition: ltable.c:433
LUAI_FUNC const TValue * luaH_getshortstr(Table *t, TString *key)
Definition: ltable.c:539
Ιστορικό Εικόνα Πληροφορίες Όλοι Οι Χρήστες Χειρίζονται Το Μενού Αριστερό Αναλογικό Αριστερό Αναλογικό Αριστερό Αναλογικό Y Αριστερό Αναλογικό Δεξί Αναλογικό X Δεξί Αναλογικό Δεξί Αναλογικό Y Δεξί Αναλογικό Σκανδάλη Όπλου Όπλο Aux A Όπλο Aux C Όπλο Select Όπλο D pad Κάτω Όπλο D pad Δεξιά Νεκρή Ζώνη Αναλογικού Σύνδεση Όλων Λήξη Χρόνου Σύνδεσης Hide Unbound Core Input Descriptors Κατάλογος Συσκευών Κατάλογος Ποντικιού Duty Cycle Keyboard Gamepad Mapping Enable Κουμπί D pad κάτω Κουμπί Κουμπί L(πίσω)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_LEFT
GLsizei const GLfloat * value
Definition: glext.h:6709
Definition: lobject.h:497
LUA_UNSIGNED lua_Unsigned
Definition: lua.h:96
Definition: lstate.h:178
Definition: lobject.h:303
LUAI_FUNC const TValue * luaH_getstr(Table *t, TString *key)
Definition: ltable.c:575