Browse Source

'lessequal' renamed 'luaV_lessequal' and exported to be used by

'lua_compare'
pull/9/head
Roberto Ierusalimschy 16 years ago
parent
commit
77fd93188e
  1. 6
      lvm.c
  2. 3
      lvm.h

6
lvm.c

@ -1,5 +1,5 @@
/*
** $Id: lvm.c,v 2.90 2009/06/01 19:09:26 roberto Exp roberto $
** $Id: lvm.c,v 2.91 2009/06/10 16:57:53 roberto Exp roberto $
** Lua virtual machine
** See Copyright Notice in lua.h
*/
@ -222,7 +222,7 @@ int luaV_lessthan (lua_State *L, const TValue *l, const TValue *r) {
}
static int lessequal (lua_State *L, const TValue *l, const TValue *r) {
int luaV_lessequal (lua_State *L, const TValue *l, const TValue *r) {
int res;
if (ttype(l) != ttype(r))
return luaG_ordererror(L, l, r);
@ -616,7 +616,7 @@ void luaV_execute (lua_State *L) {
}
case OP_LE: {
Protect(
if (lessequal(L, RKB(i), RKC(i)) == GETARG_A(i))
if (luaV_lessequal(L, RKB(i), RKC(i)) == GETARG_A(i))
dojump(GETARG_sBx(*ci->u.l.savedpc));
)
ci->u.l.savedpc++;

3
lvm.h

@ -1,5 +1,5 @@
/*
** $Id: lvm.h,v 2.8 2009/03/10 17:14:37 roberto Exp $
** $Id: lvm.h,v 2.9 2009/05/27 17:11:27 roberto Exp roberto $
** Lua virtual machine
** See Copyright Notice in lua.h
*/
@ -26,6 +26,7 @@
LUAI_FUNC int luaV_equalval_ (lua_State *L, const TValue *t1, const TValue *t2);
LUAI_FUNC int luaV_lessthan (lua_State *L, const TValue *l, const TValue *r);
LUAI_FUNC int luaV_lessequal (lua_State *L, const TValue *l, const TValue *r);
LUAI_FUNC const TValue *luaV_tonumber (const TValue *obj, TValue *n);
LUAI_FUNC int luaV_tostring (lua_State *L, StkId obj);
LUAI_FUNC void luaV_gettable (lua_State *L, const TValue *t, TValue *key,

Loading…
Cancel
Save