45#define MAXBITS (LUAI_BITSINT-2)
48#define MAXASIZE (1 << MAXBITS)
51#define hashpow2(t,n) (gnode(t, lmod((n), sizenode(t))))
53#define hashstr(t,str) hashpow2(t, (str)->tsv.hash)
54#define hashboolean(t,p) hashpow2(t, p)
61#define hashmod(t,n) (gnode(t, ((n) % ((sizenode(t)-1)|1))))
64#define hashpointer(t,p) hashmod(t, IntPoint(p))
67#define dummynode (&dummynode_)
69#define isdummy(n) ((n) == dummynode)
84 if (
cast(
unsigned int, i) == 0u - i)
103 if (
s->tsv.extra == 0) {
148 if (0 < i && i <= t->sizearray)
202 for (i = 0, twotoi = 1; twotoi/2 < *narray; i++, twotoi *= 2) {
210 if (
a == *narray)
break;
234 for (lg=0, ttlg=1; lg<=
MAXBITS; lg++, ttlg*=2) {
243 for (; i <= lim; i++) {
292 for (i=0; i<size; i++) {
309 if (nasize > oldasize)
313 if (nasize < oldasize) {
316 for (i=nasize; i<oldasize; i++) {
324 for (i =
twoto(oldhsize) - 1; i >= 0; i--) {
348 for (i=0; i<=
MAXBITS; i++) nums[i] = 0;
423 while (
gnext(othern) != mp) othern =
gnext(othern);
449 return &t->
array[key-1];
482 switch (
ttype(key)) {
548 unsigned int m = (i+j)/2;
566 unsigned int m = (i+j)/2;
580#if defined(LUA_DEBUG)
void luaG_runerror(lua_State *L, const char *fmt,...)
#define luaM_freearray(L, b, n, t)
#define luaM_newvector(L, n, t)
#define luaM_reallocvector(L, v, oldn, n, t)
#define setnvalue(obj, x)
#define LUA_TLIGHTUSERDATA
#define lua_number2int(i, d)
GCObject * luaC_newobj(lua_State *L, int tt, size_t sz, GCObject **list, int offset)
#define luaC_barrierback(L, p, v)
#define luai_hashnum(i, n)
int luaO_ceillog2(unsigned int x)
unsigned int luaS_hash(const char *str, size_t l, unsigned int seed)
void luaH_resize(lua_State *L, Table *t, int nasize, int nhsize)
static int countint(const TValue *key, int *nums)
const TValue * luaH_get(Table *t, const TValue *key)
static Node * getfreepos(Table *t)
static int unbound_search(Table *t, unsigned int j)
const TValue * luaH_getstr(Table *t, TString *key)
static void setarrayvector(lua_State *L, Table *t, int size)
int luaH_next(lua_State *L, Table *t, StkId key)
Table * luaH_new(lua_State *L)
static int findindex(lua_State *L, Table *t, StkId key)
void luaH_setint(lua_State *L, Table *t, int key, TValue *value)
void luaH_resizearray(lua_State *L, Table *t, int nasize)
static int computesizes(int nums[], int *narray)
TValue * luaH_newkey(lua_State *L, Table *t, const TValue *key)
static int numusearray(const Table *t, int *nums)
#define hashboolean(t, p)
static const Node dummynode_
static int arrayindex(const TValue *key)
static Node * hashnum(const Table *t, lua_Number n)
TValue * luaH_set(lua_State *L, Table *t, const TValue *key)
static Node * mainposition(const Table *t, const TValue *key)
#define hashpointer(t, p)
void luaH_free(lua_State *L, Table *t)
static int numusehash(const Table *t, int *nums, int *pnasize)
static void setnodevector(lua_State *L, Table *t, int size)
static void rehash(lua_State *L, Table *t, const TValue *ek)
const TValue * luaH_getint(Table *t, int key)
#define luaV_rawequalobj(o1, o2)
CURL_EXTERN CURLMcode curl_socket_t s