Details
Comments and parameter name in header file.
This commit is contained in:
27
ltable.h
27
ltable.h
@@ -52,12 +52,18 @@
|
|||||||
#define HFIRSTNODE 3
|
#define HFIRSTNODE 3
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Besides these values, pset (pre-set) operations may also return an
|
** 'luaH_get*' operations set 'res' and return HOK, unless the value is
|
||||||
** encoding of where the value should go (usually called 'hres'). That
|
** absent. In that case, they set nothing and return HNOTFOUND.
|
||||||
** means that there is a slot with that key but with no value. (pset
|
** The 'luaH_pset*' (pre-set) operations set the given value and return
|
||||||
** cannot set that value because there might be a metamethod.) If the
|
** HOK, unless the original value is absent. In that case, if the key
|
||||||
** slot is in the hash part, the encoding is (HFIRSTNODE + hash index);
|
** is really absent, they return HNOTFOUND. Otherwise, if there is a
|
||||||
** if the slot is in the array part, the encoding is (~array index).
|
** slot with that key but with no value, 'luaH_pset*' return an encoding
|
||||||
|
** of where the key is (usually called 'hres'). (pset cannot set that
|
||||||
|
** value because there might be a metamethod.) If the slot is in the
|
||||||
|
** hash part, the encoding is (HFIRSTNODE + hash index); if the slot is
|
||||||
|
** in the array part, the encoding is (~array index), a negative value.
|
||||||
|
** The value HNOTATABLE is used by the fast macros to signal that the
|
||||||
|
** value being indexed is not a table.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -125,11 +131,14 @@ union ArrayCell {
|
|||||||
(*tag = (val)->tt_, *getArrVal(h,(k)-1u) = (val)->value_)
|
(*tag = (val)->tt_, *getArrVal(h,(k)-1u) = (val)->value_)
|
||||||
|
|
||||||
|
|
||||||
|
LUAI_FUNC int luaH_get (Table *t, const TValue *key, TValue *res);
|
||||||
LUAI_FUNC int luaH_getshortstr (Table *t, TString *key, TValue *res);
|
LUAI_FUNC int luaH_getshortstr (Table *t, TString *key, TValue *res);
|
||||||
LUAI_FUNC int luaH_getstr (Table *t, TString *key, TValue *res);
|
LUAI_FUNC int luaH_getstr (Table *t, TString *key, TValue *res);
|
||||||
LUAI_FUNC int luaH_get (Table *t, const TValue *key, TValue *res);
|
|
||||||
LUAI_FUNC int luaH_getint (Table *t, lua_Integer key, TValue *res);
|
LUAI_FUNC int luaH_getint (Table *t, lua_Integer key, TValue *res);
|
||||||
|
|
||||||
|
/* Special get for metamethods */
|
||||||
|
LUAI_FUNC const TValue *luaH_Hgetshortstr (Table *t, TString *key);
|
||||||
|
|
||||||
LUAI_FUNC TString *luaH_getstrkey (Table *t, TString *key);
|
LUAI_FUNC TString *luaH_getstrkey (Table *t, TString *key);
|
||||||
|
|
||||||
LUAI_FUNC int luaH_psetint (Table *t, lua_Integer key, TValue *val);
|
LUAI_FUNC int luaH_psetint (Table *t, lua_Integer key, TValue *val);
|
||||||
@@ -139,11 +148,11 @@ LUAI_FUNC int luaH_pset (Table *t, const TValue *key, TValue *val);
|
|||||||
|
|
||||||
LUAI_FUNC void luaH_setint (lua_State *L, Table *t, lua_Integer key,
|
LUAI_FUNC void luaH_setint (lua_State *L, Table *t, lua_Integer key,
|
||||||
TValue *value);
|
TValue *value);
|
||||||
LUAI_FUNC const TValue *luaH_Hgetshortstr (Table *t, TString *key);
|
|
||||||
LUAI_FUNC void luaH_set (lua_State *L, Table *t, const TValue *key,
|
LUAI_FUNC void luaH_set (lua_State *L, Table *t, const TValue *key,
|
||||||
TValue *value);
|
TValue *value);
|
||||||
|
|
||||||
LUAI_FUNC void luaH_finishset (lua_State *L, Table *t, const TValue *key,
|
LUAI_FUNC void luaH_finishset (lua_State *L, Table *t, const TValue *key,
|
||||||
TValue *value, int aux);
|
TValue *value, int hres);
|
||||||
LUAI_FUNC Table *luaH_new (lua_State *L);
|
LUAI_FUNC Table *luaH_new (lua_State *L);
|
||||||
LUAI_FUNC void luaH_resize (lua_State *L, Table *t, unsigned int nasize,
|
LUAI_FUNC void luaH_resize (lua_State *L, Table *t, unsigned int nasize,
|
||||||
unsigned int nhsize);
|
unsigned int nhsize);
|
||||||
|
|||||||
Reference in New Issue
Block a user