Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
5496 leency 1
/*
2
** $Id: ltable.h,v 2.14 2010/06/25 12:18:10 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 gkey(n)		(&(n)->i_key.tvk)
15
#define gval(n)		(&(n)->i_val)
16
#define gnext(n)	((n)->i_key.nk.next)
17
 
18
 
19
LUAI_FUNC const TValue *luaH_getint (Table *t, int key);
20
LUAI_FUNC TValue *luaH_setint (lua_State *L, Table *t, int key);
21
LUAI_FUNC const TValue *luaH_getstr (Table *t, TString *key);
22
LUAI_FUNC TValue *luaH_setstr (lua_State *L, Table *t, TString *key);
23
LUAI_FUNC const TValue *luaH_get (Table *t, const TValue *key);
24
LUAI_FUNC TValue *luaH_set (lua_State *L, Table *t, const TValue *key);
25
LUAI_FUNC Table *luaH_new (lua_State *L);
26
LUAI_FUNC void luaH_resize (lua_State *L, Table *t, int nasize, int nhsize);
27
LUAI_FUNC void luaH_resizearray (lua_State *L, Table *t, int nasize);
28
LUAI_FUNC void luaH_free (lua_State *L, Table *t);
29
LUAI_FUNC int luaH_next (lua_State *L, Table *t, StkId key);
30
LUAI_FUNC int luaH_getn (Table *t);
31
 
32
 
33
#if defined(LUA_DEBUG)
34
LUAI_FUNC Node *luaH_mainposition (const Table *t, const TValue *key);
35
LUAI_FUNC int luaH_isdummy (Node *n);
36
#endif
37
 
38
 
39
#endif