diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-05-08 16:32:53 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-05-08 16:32:53 -0300 |
| commit | 11a70220670f25a9929439f0b27331f09f05235c (patch) | |
| tree | c4a962b5a3e53ac6df8894fb3ad2248c4a1256cb /ltable.h | |
| parent | 35a6ed283881f313152457f24cc6c677122d5058 (diff) | |
| download | lua-11a70220670f25a9929439f0b27331f09f05235c.tar.gz lua-11a70220670f25a9929439f0b27331f09f05235c.tar.bz2 lua-11a70220670f25a9929439f0b27331f09f05235c.zip | |
global variables are stored in a Lua table
Diffstat (limited to '')
| -rw-r--r-- | ltable.h | 6 |
1 files changed, 4 insertions, 2 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ltable.h,v 1.18 1999/12/07 12:05:34 roberto Exp roberto $ | 2 | ** $Id: ltable.h,v 1.19 2000/04/25 16:55:09 roberto Exp roberto $ |
| 3 | ** Lua tables (hash) | 3 | ** Lua tables (hash) |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -19,11 +19,13 @@ | |||
| 19 | Hash *luaH_new (lua_State *L, int nhash); | 19 | Hash *luaH_new (lua_State *L, int nhash); |
| 20 | void luaH_free (lua_State *L, Hash *t); | 20 | void luaH_free (lua_State *L, Hash *t); |
| 21 | const TObject *luaH_get (lua_State *L, const Hash *t, const TObject *key); | 21 | const TObject *luaH_get (lua_State *L, const Hash *t, const TObject *key); |
| 22 | const TObject *luaH_getnum (const Hash *t, Number key); | ||
| 23 | const TObject *luaH_getstr (const Hash *t, TString *key); | ||
| 22 | void luaH_set (lua_State *L, Hash *t, const TObject *key, const TObject *val); | 24 | void luaH_set (lua_State *L, Hash *t, const TObject *key, const TObject *val); |
| 23 | int luaH_pos (lua_State *L, const Hash *t, const TObject *r); | 25 | int luaH_pos (lua_State *L, const Hash *t, const TObject *r); |
| 24 | void luaH_setint (lua_State *L, Hash *t, int key, const TObject *val); | 26 | void luaH_setint (lua_State *L, Hash *t, int key, const TObject *val); |
| 25 | const TObject *luaH_getnum (const Hash *t, Number key); | ||
| 26 | unsigned long luaH_hash (lua_State *L, const TObject *key); | 27 | unsigned long luaH_hash (lua_State *L, const TObject *key); |
| 28 | const TObject *luaH_getglobal (lua_State *L, const char *name); | ||
| 27 | 29 | ||
| 28 | /* exported only for debugging */ | 30 | /* exported only for debugging */ |
| 29 | Node *luaH_mainposition (const Hash *t, const TObject *key); | 31 | Node *luaH_mainposition (const Hash *t, const TObject *key); |
