Added documentation and asserts that constants for arithmetic opcodes
must be numbers.
This commit is contained in:
Roberto Ierusalimschy
2021-02-24 11:30:46 -03:00
parent 59c88f846d
commit 31925e4cc2
2 changed files with 9 additions and 9 deletions

4
lvm.c
View File

@@ -921,7 +921,7 @@ void luaV_finishOp (lua_State *L) {
*/
#define op_arithfK(L,fop) { \
TValue *v1 = vRB(i); \
TValue *v2 = KC(i); \
TValue *v2 = KC(i); lua_assert(ttisnumber(v2)); \
op_arithf_aux(L, v1, v2, fop); }
@@ -950,7 +950,7 @@ void luaV_finishOp (lua_State *L) {
*/
#define op_arithK(L,iop,fop) { \
TValue *v1 = vRB(i); \
TValue *v2 = KC(i); \
TValue *v2 = KC(i); lua_assert(ttisnumber(v2)); \
op_arith_aux(L, v1, v2, iop, fop); }