diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2009-06-17 13:17:14 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2009-06-17 13:17:14 -0300 |
commit | 77fd93188e7ba15f489ca5cf353d270627d93681 (patch) | |
tree | b0af847d1b84625714123b7b8eb8e29d77df1d73 | |
parent | a21c89ddc8b91c9fd4888577f7a6c60c4f640795 (diff) | |
download | lua-77fd93188e7ba15f489ca5cf353d270627d93681.tar.gz lua-77fd93188e7ba15f489ca5cf353d270627d93681.tar.bz2 lua-77fd93188e7ba15f489ca5cf353d270627d93681.zip |
'lessequal' renamed 'luaV_lessequal' and exported to be used by
'lua_compare'
-rw-r--r-- | lvm.c | 6 | ||||
-rw-r--r-- | lvm.h | 3 |
2 files changed, 5 insertions, 4 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lvm.c,v 2.90 2009/06/01 19:09:26 roberto Exp roberto $ | 2 | ** $Id: lvm.c,v 2.91 2009/06/10 16:57:53 roberto Exp roberto $ |
3 | ** Lua virtual machine | 3 | ** Lua virtual machine |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -222,7 +222,7 @@ int luaV_lessthan (lua_State *L, const TValue *l, const TValue *r) { | |||
222 | } | 222 | } |
223 | 223 | ||
224 | 224 | ||
225 | static int lessequal (lua_State *L, const TValue *l, const TValue *r) { | 225 | int luaV_lessequal (lua_State *L, const TValue *l, const TValue *r) { |
226 | int res; | 226 | int res; |
227 | if (ttype(l) != ttype(r)) | 227 | if (ttype(l) != ttype(r)) |
228 | return luaG_ordererror(L, l, r); | 228 | return luaG_ordererror(L, l, r); |
@@ -616,7 +616,7 @@ void luaV_execute (lua_State *L) { | |||
616 | } | 616 | } |
617 | case OP_LE: { | 617 | case OP_LE: { |
618 | Protect( | 618 | Protect( |
619 | if (lessequal(L, RKB(i), RKC(i)) == GETARG_A(i)) | 619 | if (luaV_lessequal(L, RKB(i), RKC(i)) == GETARG_A(i)) |
620 | dojump(GETARG_sBx(*ci->u.l.savedpc)); | 620 | dojump(GETARG_sBx(*ci->u.l.savedpc)); |
621 | ) | 621 | ) |
622 | ci->u.l.savedpc++; | 622 | ci->u.l.savedpc++; |
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lvm.h,v 2.8 2009/03/10 17:14:37 roberto Exp $ | 2 | ** $Id: lvm.h,v 2.9 2009/05/27 17:11:27 roberto Exp roberto $ |
3 | ** Lua virtual machine | 3 | ** Lua virtual machine |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -26,6 +26,7 @@ | |||
26 | LUAI_FUNC int luaV_equalval_ (lua_State *L, const TValue *t1, const TValue *t2); | 26 | LUAI_FUNC int luaV_equalval_ (lua_State *L, const TValue *t1, const TValue *t2); |
27 | 27 | ||
28 | LUAI_FUNC int luaV_lessthan (lua_State *L, const TValue *l, const TValue *r); | 28 | LUAI_FUNC int luaV_lessthan (lua_State *L, const TValue *l, const TValue *r); |
29 | LUAI_FUNC int luaV_lessequal (lua_State *L, const TValue *l, const TValue *r); | ||
29 | LUAI_FUNC const TValue *luaV_tonumber (const TValue *obj, TValue *n); | 30 | LUAI_FUNC const TValue *luaV_tonumber (const TValue *obj, TValue *n); |
30 | LUAI_FUNC int luaV_tostring (lua_State *L, StkId obj); | 31 | LUAI_FUNC int luaV_tostring (lua_State *L, StkId obj); |
31 | LUAI_FUNC void luaV_gettable (lua_State *L, const TValue *t, TValue *key, | 32 | LUAI_FUNC void luaV_gettable (lua_State *L, const TValue *t, TValue *key, |