native Lua  0.4.0
Lua on the platform you use with the compiler you choose
Data Structures | Macros | Functions
ltable.c File Reference
#include "lprefix.h"
#include <math.h>
#include <limits.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"
Include dependency graph for ltable.c:

Data Structures

struct  AuxsetnodeT
 

Macros

#define ltable_c
 
#define LUA_CORE
 
#define MAXABITS   cast_int(sizeof(int) * CHAR_BIT - 1)
 
#define MAXASIZE   (1u << MAXABITS)
 
#define MAXHBITS   (MAXABITS - 1)
 
#define hashpow2(t, n)   (gnode(t, lmod((n), sizenode(t))))
 
#define hashstr(t, str)   hashpow2(t, (str)->hash)
 
#define hashboolean(t, p)   hashpow2(t, p)
 
#define hashint(t, i)   hashpow2(t, i)
 
#define hashmod(t, n)   (gnode(t, ((n) % ((sizenode(t)-1)|1))))
 
#define hashpointer(t, p)   hashmod(t, point2uint(p))
 
#define dummynode   (&dummynode_)
 

Functions

int luaH_next (lua_State *L, Table *t, StkId key)
 
void luaH_resize (lua_State *L, Table *t, unsigned int nasize, unsigned int nhsize)
 
void luaH_resizearray (lua_State *L, Table *t, unsigned int nasize)
 
TableluaH_new (lua_State *L)
 
void luaH_free (lua_State *L, Table *t)
 
TValueluaH_newkey (lua_State *L, Table *t, const TValue *key)
 
const TValueluaH_getint (Table *t, lua_Integer key)
 
const TValueluaH_getshortstr (Table *t, TString *key)
 
const TValueluaH_getstr (Table *t, TString *key)
 
const TValueluaH_get (Table *t, const TValue *key)
 
TValueluaH_set (lua_State *L, Table *t, const TValue *key)
 
void luaH_setint (lua_State *L, Table *t, lua_Integer key, TValue *value)
 
lua_Unsigned luaH_getn (Table *t)
 

Macro Definition Documentation

◆ dummynode

#define dummynode   (&dummynode_)

◆ hashboolean

#define hashboolean (   t,
 
)    hashpow2(t, p)

◆ hashint

#define hashint (   t,
 
)    hashpow2(t, i)

◆ hashmod

#define hashmod (   t,
 
)    (gnode(t, ((n) % ((sizenode(t)-1)|1))))

◆ hashpointer

#define hashpointer (   t,
 
)    hashmod(t, point2uint(p))

◆ hashpow2

#define hashpow2 (   t,
 
)    (gnode(t, lmod((n), sizenode(t))))

◆ hashstr

#define hashstr (   t,
  str 
)    hashpow2(t, (str)->hash)

◆ ltable_c

#define ltable_c

◆ LUA_CORE

#define LUA_CORE

◆ MAXABITS

#define MAXABITS   cast_int(sizeof(int) * CHAR_BIT - 1)

◆ MAXASIZE

#define MAXASIZE   (1u << MAXABITS)

◆ MAXHBITS

#define MAXHBITS   (MAXABITS - 1)

Function Documentation

◆ luaH_free()

void luaH_free ( lua_State L,
Table t 
)

◆ luaH_get()

const TValue* luaH_get ( Table t,
const TValue key 
)

◆ luaH_getint()

const TValue* luaH_getint ( Table t,
lua_Integer  key 
)

◆ luaH_getn()

lua_Unsigned luaH_getn ( Table t)

◆ luaH_getshortstr()

const TValue* luaH_getshortstr ( Table t,
TString key 
)

◆ luaH_getstr()

const TValue* luaH_getstr ( Table t,
TString key 
)

◆ luaH_new()

Table* luaH_new ( lua_State L)

◆ luaH_newkey()

TValue* luaH_newkey ( lua_State L,
Table t,
const TValue key 
)

◆ luaH_next()

int luaH_next ( lua_State L,
Table t,
StkId  key 
)

◆ luaH_resize()

void luaH_resize ( lua_State L,
Table t,
unsigned int  nasize,
unsigned int  nhsize 
)

◆ luaH_resizearray()

void luaH_resizearray ( lua_State L,
Table t,
unsigned int  nasize 
)

◆ luaH_set()

TValue* luaH_set ( lua_State L,
Table t,
const TValue key 
)

◆ luaH_setint()

void luaH_setint ( lua_State L,
Table t,
lua_Integer  key,
TValue value 
)