Github User Fetcher 1.0.0
C Application with Server and GUI
|
#include <string.h>
#include "lua.h"
#include "ldebug.h"
#include "ldo.h"
#include "lgc.h"
#include "lmem.h"
#include "lobject.h"
#include "lstate.h"
#include "lstring.h"
#include "ltable.h"
#include "lvm.h"
Go to the source code of this file.
Macros | |
#define | ltable_c |
#define | LUA_CORE |
#define | MAXBITS (LUAI_BITSINT-2) |
#define | MAXASIZE (1 << MAXBITS) |
#define | hashpow2(t, n) (gnode(t, lmod((n), sizenode(t)))) |
#define | hashstr(t, str) hashpow2(t, (str)->tsv.hash) |
#define | hashboolean(t, p) hashpow2(t, p) |
#define | hashmod(t, n) (gnode(t, ((n) % ((sizenode(t)-1)|1)))) |
#define | hashpointer(t, p) hashmod(t, IntPoint(p)) |
#define | dummynode (&dummynode_) |
#define | isdummy(n) ((n) == dummynode) |
Functions | |
static Node * | hashnum (const Table *t, lua_Number n) |
static Node * | mainposition (const Table *t, const TValue *key) |
static int | arrayindex (const TValue *key) |
static int | findindex (lua_State *L, Table *t, StkId key) |
int | luaH_next (lua_State *L, Table *t, StkId key) |
static int | computesizes (int nums[], int *narray) |
static int | countint (const TValue *key, int *nums) |
static int | numusearray (const Table *t, int *nums) |
static int | numusehash (const Table *t, int *nums, int *pnasize) |
static void | setarrayvector (lua_State *L, Table *t, int size) |
static void | setnodevector (lua_State *L, Table *t, int size) |
void | luaH_resize (lua_State *L, Table *t, int nasize, int nhsize) |
void | luaH_resizearray (lua_State *L, Table *t, int nasize) |
static void | rehash (lua_State *L, Table *t, const TValue *ek) |
Table * | luaH_new (lua_State *L) |
void | luaH_free (lua_State *L, Table *t) |
static Node * | getfreepos (Table *t) |
TValue * | luaH_newkey (lua_State *L, Table *t, const TValue *key) |
const TValue * | luaH_getint (Table *t, int key) |
const TValue * | luaH_getstr (Table *t, TString *key) |
const TValue * | luaH_get (Table *t, const TValue *key) |
TValue * | luaH_set (lua_State *L, Table *t, const TValue *key) |
void | luaH_setint (lua_State *L, Table *t, int key, TValue *value) |
static int | unbound_search (Table *t, unsigned int j) |
int | luaH_getn (Table *t) |
Variables | |
static const Node | dummynode_ |
#define dummynode (&dummynode_) |
Definition at line 67 of file lua-5.2.4/src/ltable.c.
Referenced by setnodevector().
#define hashboolean | ( | t, | |
p ) hashpow2(t, p) |
Definition at line 54 of file lua-5.2.4/src/ltable.c.
Referenced by mainposition().
Definition at line 61 of file lua-5.2.4/src/ltable.c.
Referenced by hashnum().
Definition at line 64 of file lua-5.2.4/src/ltable.c.
Referenced by mainposition().
Definition at line 51 of file lua-5.2.4/src/ltable.c.
#define hashstr | ( | t, | |
str ) hashpow2(t, (str)->tsv.hash) |
Definition at line 53 of file lua-5.2.4/src/ltable.c.
Referenced by luaH_getstr(), and mainposition().
#define isdummy | ( | n | ) | ((n) == dummynode) |
Definition at line 69 of file lua-5.2.4/src/ltable.c.
Referenced by freehash(), getfreepos(), getfreepos(), luaH_free(), luaH_getn(), luaH_newkey(), luaH_newkey(), luaH_resize(), and luaH_resizearray().
#define ltable_c |
Definition at line 23 of file lua-5.2.4/src/ltable.c.
#define LUA_CORE |
Definition at line 24 of file lua-5.2.4/src/ltable.c.
#define MAXASIZE (1 << MAXBITS) |
Definition at line 48 of file lua-5.2.4/src/ltable.c.
Referenced by countint().
#define MAXBITS (LUAI_BITSINT-2) |
Definition at line 45 of file lua-5.2.4/src/ltable.c.
Referenced by numusearray(), rehash(), and setnodevector().
|
static |
Definition at line 127 of file lua-5.2.4/src/ltable.c.
References cast_num, lua_number2int, luai_numeq, nvalue, and ttisnumber.
Referenced by countint(), and findindex().
|
static |
Definition at line 196 of file lua-5.2.4/src/ltable.c.
References lua_assert.
Referenced by rehash().
|
static |
Definition at line 218 of file lua-5.2.4/src/ltable.c.
References arrayindex(), luaO_ceillog2(), and MAXASIZE.
Referenced by numusehash(), and rehash().
Definition at line 144 of file lua-5.2.4/src/ltable.c.
References arrayindex(), cast_int, deadvalue, gcvalue, gkey, gnext, gnode, iscollectable, LUA_QL, luaG_runerror(), luaV_rawequalobj, mainposition(), NULL, Table::sizearray, ttisdeadkey, and ttisnil.
Referenced by luaH_next().
Definition at line 387 of file lua-5.2.4/src/ltable.c.
References gkey, Table::lastfree, Table::node, NULL, and ttisnil.
Referenced by luaH_newkey().
|
static |
Definition at line 80 of file lua-5.2.4/src/ltable.c.
References cast, hashmod, and luai_hashnum.
Referenced by luaH_getint(), and mainposition().
Definition at line 379 of file lua-5.2.4/src/ltable.c.
References Table::array, cast, isdummy, luaM_free, luaM_freearray, Table::node, Table::sizearray, and sizenode.
Definition at line 481 of file lua-5.2.4/src/ltable.c.
References cast_num, gkey, gnext, gval, lua_number2int, LUA_TNIL, LUA_TNUMBER, LUA_TSHRSTR, luaH_getint(), luaH_getstr(), luai_numeq, luaO_nilobject, luaV_rawequalobj, mainposition(), nvalue, rawtsvalue, and ttype.
Referenced by luaH_set().
Definition at line 446 of file lua-5.2.4/src/ltable.c.
References Table::array, cast, cast_num, gkey, gnext, gval, hashnum(), luai_numeq, luaO_nilobject, nvalue, Table::sizearray, and ttisnumber.
Referenced by lua_getglobal(), lua_getglobal(), lua_geti(), lua_load(), lua_rawgeti(), lua_rawgeti(), lua_setglobal(), lua_setglobal(), lua_seti(), luaH_get(), luaH_setint(), and unbound_search().
int luaH_getn | ( | Table * | t | ) |
Definition at line 560 of file lua-5.2.4/src/ltable.c.
References Table::array, isdummy, Table::node, Table::sizearray, ttisnil, and unbound_search().
Definition at line 466 of file lua-5.2.4/src/ltable.c.
References eqshrstr, gkey, gnext, gval, hashstr, lua_assert, LUA_TSHRSTR, luaO_nilobject, rawtsvalue, TString::tsv, and ttisshrstring.
Referenced by luaH_get().
Definition at line 368 of file lua-5.2.4/src/ltable.c.
References Table::array, cast_byte, Table::flags, GCObject::h, LUA_TTABLE, luaC_newobj(), Table::metatable, NULL, setnodevector(), and Table::sizearray.
Definition at line 405 of file lua-5.2.4/src/ltable.c.
References getfreepos(), gkey, gnext, gval, isdummy, lua_assert, luaC_barrierback, luaG_runerror(), luaH_set(), luai_numisnan, mainposition(), NULL, nvalue, obj2gco, rehash(), setnilvalue, setobj2t, ttisnil, and ttisnumber.
Referenced by luaH_set(), luaH_setint(), luaV_finishset(), and luaV_settable().
Definition at line 169 of file lua-5.2.4/src/ltable.c.
References Table::array, cast_num, findindex(), gkey, gnode, gval, setnvalue, setobj2s, Table::sizearray, sizenode, and ttisnil.
Definition at line 304 of file lua-5.2.4/src/ltable.c.
References Table::array, cast, gkey, gval, isdummy, Table::lsizenode, luaH_set(), luaH_setint(), luaM_freearray, luaM_reallocvector, Table::node, setarrayvector(), setnodevector(), setobjt2t, Table::sizearray, ttisnil, and twoto.
Referenced by init_registry(), init_registry(), init_registry(), lua_createtable(), luaH_resizearray(), luaV_execute(), luaV_execute(), and rehash().
Definition at line 337 of file lua-5.2.4/src/ltable.c.
References isdummy, luaH_resize(), Table::node, and sizenode.
Definition at line 510 of file lua-5.2.4/src/ltable.c.
References cast, luaH_get(), luaH_newkey(), and luaO_nilobject.
Referenced by luaH_newkey(), and luaH_resize().
Definition at line 518 of file lua-5.2.4/src/ltable.c.
References cast, cast_num, luaH_getint(), luaH_newkey(), luaO_nilobject, setnvalue, setobj2t, and value.
Referenced by collectvalidlines(), collectvalidlines(), collectvalidlines(), init_registry(), init_registry(), lua_rawseti(), lua_rawseti(), luaH_resize(), and luaV_execute().
Definition at line 97 of file lua-5.2.4/src/ltable.c.
References bvalue, fvalue, gcvalue, getstr, hashboolean, hashnum(), hashpointer, hashstr, LUA_TBOOLEAN, LUA_TLCF, LUA_TLIGHTUSERDATA, LUA_TLNGSTR, LUA_TNUMBER, LUA_TSHRSTR, luaS_hash(), nvalue, pvalue, rawtsvalue, s, and ttype.
Referenced by findindex(), luaH_get(), and luaH_newkey().
|
static |
Definition at line 229 of file lua-5.2.4/src/ltable.c.
References Table::array, MAXBITS, Table::sizearray, and ttisnil.
Referenced by rehash().
|
static |
Definition at line 254 of file lua-5.2.4/src/ltable.c.
References countint(), gkey, gval, Table::node, sizenode, and ttisnil.
Referenced by rehash().
Definition at line 343 of file lua-5.2.4/src/ltable.c.
References computesizes(), countint(), luaH_resize(), MAXBITS, numusearray(), and numusehash().
Referenced by luaH_newkey().
Definition at line 270 of file lua-5.2.4/src/ltable.c.
References Table::array, luaM_reallocvector, setnilvalue, and Table::sizearray.
Referenced by luaH_resize().
Definition at line 279 of file lua-5.2.4/src/ltable.c.
References cast, cast_byte, dummynode, gkey, gnext, gnode, gval, Table::lastfree, Table::lsizenode, luaG_runerror(), luaM_newvector, luaO_ceillog2(), MAXBITS, Table::node, NULL, setnilvalue, and twoto.
Referenced by luaH_new(), and luaH_resize().
|
static |
Definition at line 532 of file lua-5.2.4/src/ltable.c.
References cast, luaH_getint(), MAX_INT, and ttisnil.
Referenced by luaH_getn().
|
static |
Definition at line 71 of file lua-5.2.4/src/ltable.c.