mirror of
https://github.com/lua/lua.git
synced 2025-01-28 06:03:00 +08:00
luaH_set does the set, and protects its value, so luaH_move can be a
macro.
This commit is contained in:
parent
4a13f513f8
commit
57ffc3f009
8
ltable.h
8
ltable.h
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
** $Id: ltable.h,v 1.8 1999/01/04 12:54:33 roberto Exp roberto $
|
** $Id: ltable.h,v 1.9 1999/01/25 12:30:11 roberto Exp roberto $
|
||||||
** Lua tables (hash)
|
** Lua tables (hash)
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
@ -16,15 +16,15 @@
|
|||||||
#define nhash(t) ((t)->nhash)
|
#define nhash(t) ((t)->nhash)
|
||||||
|
|
||||||
#define luaH_get(t,ref) (val(luaH_present((t), (ref))))
|
#define luaH_get(t,ref) (val(luaH_present((t), (ref))))
|
||||||
|
#define luaH_move(t,from,to) (luaH_setint(t, to, luaH_getint(t, from)))
|
||||||
|
|
||||||
Hash *luaH_new (int nhash);
|
Hash *luaH_new (int nhash);
|
||||||
void luaH_free (Hash *frees);
|
void luaH_free (Hash *frees);
|
||||||
Node *luaH_present (Hash *t, TObject *ref);
|
Node *luaH_present (Hash *t, TObject *key);
|
||||||
TObject *luaH_set (Hash *t, TObject *ref);
|
void luaH_set (Hash *t, TObject *ref, TObject *val);
|
||||||
Node *luaH_next (Hash *t, TObject *r);
|
Node *luaH_next (Hash *t, TObject *r);
|
||||||
void luaH_setint (Hash *t, int ref, TObject *val);
|
void luaH_setint (Hash *t, int ref, TObject *val);
|
||||||
TObject *luaH_getint (Hash *t, int ref);
|
TObject *luaH_getint (Hash *t, int ref);
|
||||||
void luaH_move (Hash *t, int from, int to);
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user