mirror of https://github.com/rusefi/lua.git
luaH_[gs]etnum renamed to luaH_[gs]etint (as they only accept integers,
not generic numbers)
This commit is contained in:
parent
95cbc402dc
commit
3135a6bbab
6
lapi.c
6
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
|
** Lua API
|
||||||
** See Copyright Notice in lua.h
|
** 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);
|
lua_lock(L);
|
||||||
o = index2addr(L, idx);
|
o = index2addr(L, idx);
|
||||||
api_check(L, ttistable(o));
|
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);
|
api_incr_top(L);
|
||||||
lua_unlock(L);
|
lua_unlock(L);
|
||||||
}
|
}
|
||||||
|
@ -683,7 +683,7 @@ LUA_API void lua_rawseti (lua_State *L, int idx, int n) {
|
||||||
api_checknelems(L, 1);
|
api_checknelems(L, 1);
|
||||||
o = index2addr(L, idx);
|
o = index2addr(L, idx);
|
||||||
api_check(L, ttistable(o));
|
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);
|
luaC_barriert(L, hvalue(o), L->top-1);
|
||||||
L->top--;
|
L->top--;
|
||||||
lua_unlock(L);
|
lua_unlock(L);
|
||||||
|
|
4
ldebug.c
4
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
|
** Debug Interface
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
@ -191,7 +191,7 @@ static void collectvalidlines (lua_State *L, Closure *f) {
|
||||||
sethvalue(L, L->top, t);
|
sethvalue(L, L->top, t);
|
||||||
incr_top(L);
|
incr_top(L);
|
||||||
for (i=0; i<f->l.p->sizelineinfo; i++)
|
for (i=0; i<f->l.p->sizelineinfo; i++)
|
||||||
setbvalue(luaH_setnum(L, t, lineinfo[i]), 1);
|
setbvalue(luaH_setint(L, t, lineinfo[i]), 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
6
ltable.h
6
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)
|
** Lua tables (hash)
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
@ -18,8 +18,8 @@
|
||||||
#define key2tval(n) (&(n)->i_key.tvk)
|
#define key2tval(n) (&(n)->i_key.tvk)
|
||||||
|
|
||||||
|
|
||||||
LUAI_FUNC const TValue *luaH_getnum (Table *t, int key);
|
LUAI_FUNC const TValue *luaH_getint (Table *t, int key);
|
||||||
LUAI_FUNC TValue *luaH_setnum (lua_State *L, 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 const TValue *luaH_getstr (Table *t, TString *key);
|
||||||
LUAI_FUNC TValue *luaH_setstr (lua_State *L, 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);
|
LUAI_FUNC const TValue *luaH_get (Table *t, const TValue *key);
|
||||||
|
|
4
lvm.c
4
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
|
** Lua virtual machine
|
||||||
** See Copyright Notice in lua.h
|
** 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 */
|
luaH_resizearray(L, h, last); /* pre-alloc it at once */
|
||||||
for (; n > 0; n--) {
|
for (; n > 0; n--) {
|
||||||
TValue *val = ra+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);
|
luaC_barriert(L, h, val);
|
||||||
}
|
}
|
||||||
L->top = ci->top; /* correct top (in case of previous open call) */
|
L->top = ci->top; /* correct top (in case of previous open call) */
|
||||||
|
|
Loading…
Reference in New Issue