lua

A copy of the Lua development repository
Log | Files | Refs | README

commit 57ffc3f0094978fd2eb7ec2883cf6fca28145e90
parent 4a13f513f8070003019eec0afc566608e436212b
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date:   Mon, 25 Jan 1999 15:39:48 -0200

luaH_set does the set, and protects its value, so luaH_move can be a
macro.

Diffstat:
Mltable.h | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git 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