From 1ea2d20f74cea9c61817d4a5ed67c4fc47cafb51 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 30 Dec 2013 18:47:58 -0200 Subject: first implementation of '<<', '>>', and '~' (bitwise not) --- lapi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lapi.c') diff --git a/lapi.c b/lapi.c index ca37dbee..de13bd62 100644 --- a/lapi.c +++ b/lapi.c @@ -1,5 +1,5 @@ /* -** $Id: lapi.c,v 2.190 2013/09/13 16:21:52 roberto Exp roberto $ +** $Id: lapi.c,v 2.191 2013/12/04 12:15:22 roberto Exp roberto $ ** Lua API ** See Copyright Notice in lua.h */ @@ -299,9 +299,9 @@ LUA_API int lua_rawequal (lua_State *L, int index1, int index2) { LUA_API void lua_arith (lua_State *L, int op) { lua_lock(L); - if (op != LUA_OPUNM) /* all other operations expect two operands */ - api_checknelems(L, 2); - else { /* for unary minus, add fake 2nd operand */ + if (op != LUA_OPUNM && op != LUA_OPBNOT) + api_checknelems(L, 2); /* all other operations expect two operands */ + else { /* for unary operations, add fake 2nd operand */ api_checknelems(L, 1); setobjs2s(L, L->top, L->top - 1); L->top++; -- cgit v1.2.3-55-g6feb