Lua tables (hash)

This commit is contained in:
Roberto Ierusalimschy
1997-09-16 16:25:59 -03:00
parent 2d2440a753
commit a404f6e0e6
4 changed files with 245 additions and 376 deletions

27
ltable.h Normal file
View File

@@ -0,0 +1,27 @@
/*
** $Id: $
** Lua tables (hash)
** See Copyright Notice in lua.h
*/
#ifndef ltable_h
#define ltable_h
#include "lobject.h"
extern Hash *luaH_root;
#define node(t,i) (&(t)->node[i])
#define ref(n) (&(n)->ref)
#define nhash(t) ((t)->nhash)
Hash *luaH_new (int nhash);
void luaH_callIM (Hash *l);
void luaH_free (Hash *frees);
TObject *luaH_get (Hash *t, TObject *ref);
TObject *luaH_set (Hash *t, TObject *ref);
Node *luaH_next (TObject *o, TObject *r);
#endif