From 3135a6bbaba406fd9f1e97e0b9c8415e1ad32579 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 7 Aug 2009 13:17:41 -0300 Subject: [PATCH] luaH_[gs]etnum renamed to luaH_[gs]etint (as they only accept integers, not generic numbers) --- lapi.c | 6 +++--- ldebug.c | 4 ++-- ltable.h | 6 +++--- lvm.c | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lapi.c b/lapi.c index b05897d7..eb1f3786 100644 --- a/lapi.c +++ b/lapi.c @@ -1,5 +1,5 @@ /* -** $Id: lapi.c,v 2.86 2009/07/15 17:57:03 roberto Exp roberto $ +** $Id: lapi.c,v 2.87 2009/07/15 18:37:19 roberto Exp roberto $ ** Lua API ** See Copyright Notice in lua.h */ @@ -562,7 +562,7 @@ LUA_API void lua_rawgeti (lua_State *L, int idx, int n) { lua_lock(L); o = index2addr(L, idx); api_check(L, ttistable(o)); - setobj2s(L, L->top, luaH_getnum(hvalue(o), n)); + setobj2s(L, L->top, luaH_getint(hvalue(o), n)); api_incr_top(L); lua_unlock(L); } @@ -683,7 +683,7 @@ LUA_API void lua_rawseti (lua_State *L, int idx, int n) { api_checknelems(L, 1); o = index2addr(L, idx); api_check(L, ttistable(o)); - setobj2t(L, luaH_setnum(L, hvalue(o), n), L->top-1); + setobj2t(L, luaH_setint(L, hvalue(o), n), L->top-1); luaC_barriert(L, hvalue(o), L->top-1); L->top--; lua_unlock(L); diff --git a/ldebug.c b/ldebug.c index db5d1ebb..58039611 100644 --- a/ldebug.c +++ b/ldebug.c @@ -1,5 +1,5 @@ /* -** $Id: ldebug.c,v 2.51 2009/06/01 19:09:26 roberto Exp roberto $ +** $Id: ldebug.c,v 2.52 2009/06/10 16:57:53 roberto Exp roberto $ ** Debug Interface ** See Copyright Notice in lua.h */ @@ -191,7 +191,7 @@ static void collectvalidlines (lua_State *L, Closure *f) { sethvalue(L, L->top, t); incr_top(L); for (i=0; il.p->sizelineinfo; i++) - setbvalue(luaH_setnum(L, t, lineinfo[i]), 1); + setbvalue(luaH_setint(L, t, lineinfo[i]), 1); } } diff --git a/ltable.h b/ltable.h index 60569fd0..681dfbbf 100644 --- a/ltable.h +++ b/ltable.h @@ -1,5 +1,5 @@ /* -** $Id: ltable.h,v 2.10 2006/01/10 13:13:06 roberto Exp roberto $ +** $Id: ltable.h,v 2.11 2006/07/11 15:53:29 roberto Exp roberto $ ** Lua tables (hash) ** See Copyright Notice in lua.h */ @@ -18,8 +18,8 @@ #define key2tval(n) (&(n)->i_key.tvk) -LUAI_FUNC const TValue *luaH_getnum (Table *t, int key); -LUAI_FUNC TValue *luaH_setnum (lua_State *L, Table *t, int key); +LUAI_FUNC const TValue *luaH_getint (Table *t, int key); +LUAI_FUNC TValue *luaH_setint (lua_State *L, Table *t, int key); LUAI_FUNC const TValue *luaH_getstr (Table *t, TString *key); LUAI_FUNC TValue *luaH_setstr (lua_State *L, Table *t, TString *key); LUAI_FUNC const TValue *luaH_get (Table *t, const TValue *key); diff --git a/lvm.c b/lvm.c index 056e09e6..d1c04835 100644 --- a/lvm.c +++ b/lvm.c @@ -1,5 +1,5 @@ /* -** $Id: lvm.c,v 2.94 2009/07/01 20:31:25 roberto Exp roberto $ +** $Id: lvm.c,v 2.95 2009/07/15 18:38:16 roberto Exp roberto $ ** Lua virtual machine ** See Copyright Notice in lua.h */ @@ -754,7 +754,7 @@ void luaV_execute (lua_State *L) { luaH_resizearray(L, h, last); /* pre-alloc it at once */ for (; n > 0; n--) { TValue *val = ra+n; - setobj2t(L, luaH_setnum(L, h, last--), val); + setobj2t(L, luaH_setint(L, h, last--), val); luaC_barriert(L, h, val); } L->top = ci->top; /* correct top (in case of previous open call) */