Browse Source

function 'reverse' uses appropriate variants of 'setobj' for better
documentation

Roberto Ierusalimschy 11 years ago
parent
commit
e3b9569e04
1 changed files with 3 additions and 3 deletions
  1. 3 3
      lapi.c

+ 3 - 3
lapi.c

@@ -1,5 +1,5 @@
 /*
-** $Id: lapi.c,v 2.210 2014/05/13 19:40:28 roberto Exp roberto $
+** $Id: lapi.c,v 2.211 2014/05/14 14:20:17 roberto Exp roberto $
 ** Lua API
 ** See Copyright Notice in lua.h
 */
@@ -189,8 +189,8 @@ static void reverse (lua_State *L, StkId from, StkId to) {
   for (; from < to; from++, to--) {
     TValue temp;
     setobj(L, &temp, from);
-    setobj(L, from, to);
-    setobj(L, to, &temp);
+    setobjs2s(L, from, to);
+    setobj2s(L, to, &temp);
   }
 }