diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2019-05-13 16:20:40 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2019-05-13 16:20:40 -0300 |
commit | 0b63d79b36790febd4c081bf8d6737df27529f8d (patch) | |
tree | a59ac63d213b00fb0dcaaa65f6d24526c4f260f7 /ltablib.c | |
parent | 279c3a6961c60252f0368fdea889caf977f85fe0 (diff) | |
download | lua-0b63d79b36790febd4c081bf8d6737df27529f8d.tar.gz lua-0b63d79b36790febd4c081bf8d6737df27529f8d.tar.bz2 lua-0b63d79b36790febd4c081bf8d6737df27529f8d.zip |
Details
- 'luaL_setfuncs' avoids creating closures for placeholders.
- Fixed some warnings about unused values in comma expressions.
- Comments.
Diffstat (limited to 'ltablib.c')
-rw-r--r-- | ltablib.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -299,7 +299,7 @@ static IdxT partition (lua_State *L, IdxT lo, IdxT up) { | |||
299 | /* loop invariant: a[lo .. i] <= P <= a[j .. up] */ | 299 | /* loop invariant: a[lo .. i] <= P <= a[j .. up] */ |
300 | for (;;) { | 300 | for (;;) { |
301 | /* next loop: repeat ++i while a[i] < P */ | 301 | /* next loop: repeat ++i while a[i] < P */ |
302 | while (lua_geti(L, 1, ++i), sort_comp(L, -1, -2)) { | 302 | while ((void)lua_geti(L, 1, ++i), sort_comp(L, -1, -2)) { |
303 | if (i == up - 1) /* a[i] < P but a[up - 1] == P ?? */ | 303 | if (i == up - 1) /* a[i] < P but a[up - 1] == P ?? */ |
304 | luaL_error(L, "invalid order function for sorting"); | 304 | luaL_error(L, "invalid order function for sorting"); |
305 | lua_pop(L, 1); /* remove a[i] */ | 305 | lua_pop(L, 1); /* remove a[i] */ |