aboutsummaryrefslogtreecommitdiff
path: root/lapi.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2013-12-30 18:47:58 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2013-12-30 18:47:58 -0200
commit1ea2d20f74cea9c61817d4a5ed67c4fc47cafb51 (patch)
treebdedb3205963f8db43391aaef5be853cdeb59df4 /lapi.c
parentf5133aa1a55cee96b535ff788764437deacdc26a (diff)
downloadlua-1ea2d20f74cea9c61817d4a5ed67c4fc47cafb51.tar.gz
lua-1ea2d20f74cea9c61817d4a5ed67c4fc47cafb51.tar.bz2
lua-1ea2d20f74cea9c61817d4a5ed67c4fc47cafb51.zip
first implementation of '<<', '>>', and '~' (bitwise not)
Diffstat (limited to 'lapi.c')
-rw-r--r--lapi.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lapi.c b/lapi.c
index ca37dbee..de13bd62 100644
--- a/lapi.c
+++ b/lapi.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lapi.c,v 2.190 2013/09/13 16:21:52 roberto Exp roberto $ 2** $Id: lapi.c,v 2.191 2013/12/04 12:15:22 roberto Exp roberto $
3** Lua API 3** Lua API
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -299,9 +299,9 @@ LUA_API int lua_rawequal (lua_State *L, int index1, int index2) {
299 299
300LUA_API void lua_arith (lua_State *L, int op) { 300LUA_API void lua_arith (lua_State *L, int op) {
301 lua_lock(L); 301 lua_lock(L);
302 if (op != LUA_OPUNM) /* all other operations expect two operands */ 302 if (op != LUA_OPUNM && op != LUA_OPBNOT)
303 api_checknelems(L, 2); 303 api_checknelems(L, 2); /* all other operations expect two operands */
304 else { /* for unary minus, add fake 2nd operand */ 304 else { /* for unary operations, add fake 2nd operand */
305 api_checknelems(L, 1); 305 api_checknelems(L, 1);
306 setobjs2s(L, L->top, L->top - 1); 306 setobjs2s(L, L->top, L->top - 1);
307 L->top++; 307 L->top++;