From 57ffc3f0094978fd2eb7ec2883cf6fca28145e90 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 25 Jan 1999 15:40:10 -0200 Subject: luaH_set does the set, and protects its value, so luaH_move can be a macro. --- ltable.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ltable.h b/ltable.h index e03f9d5c..766bda16 100644 --- a/ltable.h +++ b/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) ** See Copyright Notice in lua.h */ @@ -16,15 +16,15 @@ #define nhash(t) ((t)->nhash) #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); void luaH_free (Hash *frees); -Node *luaH_present (Hash *t, TObject *ref); -TObject *luaH_set (Hash *t, TObject *ref); +Node *luaH_present (Hash *t, TObject *key); +void luaH_set (Hash *t, TObject *ref, TObject *val); Node *luaH_next (Hash *t, TObject *r); void luaH_setint (Hash *t, int ref, TObject *val); TObject *luaH_getint (Hash *t, int ref); -void luaH_move (Hash *t, int from, int to); #endif -- cgit v1.2.3-55-g6feb