diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-05-02 14:12:27 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-05-02 14:12:27 -0300 |
commit | 85dcb411a8454de0bc1c2c60a24af1588e436c23 (patch) | |
tree | 169fc4cefe7ba02a46944a172660aff208b3e42e /ltablib.c | |
parent | 3c6a383d6239629fd8858e0d59bcdab25138bcc1 (diff) | |
download | lua-85dcb411a8454de0bc1c2c60a24af1588e436c23.tar.gz lua-85dcb411a8454de0bc1c2c60a24af1588e436c23.tar.bz2 lua-85dcb411a8454de0bc1c2c60a24af1588e436c23.zip |
all textual errors go through `luaL_verror'
Diffstat (limited to 'ltablib.c')
-rw-r--r-- | ltablib.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltablib.c,v 1.1 2002/04/09 20:19:06 roberto Exp roberto $ | 2 | ** $Id: ltablib.c,v 1.2 2002/04/12 19:57:29 roberto Exp roberto $ |
3 | ** Library for Table Manipulation | 3 | ** Library for Table Manipulation |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -171,12 +171,12 @@ static void auxsort (lua_State *L, int l, int u) { | |||
171 | for (;;) { /* invariant: a[l..i] <= P <= a[j..u] */ | 171 | for (;;) { /* invariant: a[l..i] <= P <= a[j..u] */ |
172 | /* repeat ++i until a[i] >= P */ | 172 | /* repeat ++i until a[i] >= P */ |
173 | while (lua_rawgeti(L, 1, ++i), sort_comp(L, -1, -2)) { | 173 | while (lua_rawgeti(L, 1, ++i), sort_comp(L, -1, -2)) { |
174 | if (i>u) lua_error(L, "invalid order function for sorting"); | 174 | if (i>u) luaL_verror(L, "invalid order function for sorting"); |
175 | lua_pop(L, 1); /* remove a[i] */ | 175 | lua_pop(L, 1); /* remove a[i] */ |
176 | } | 176 | } |
177 | /* repeat --j until a[j] <= P */ | 177 | /* repeat --j until a[j] <= P */ |
178 | while (lua_rawgeti(L, 1, --j), sort_comp(L, -3, -1)) { | 178 | while (lua_rawgeti(L, 1, --j), sort_comp(L, -3, -1)) { |
179 | if (j<l) lua_error(L, "invalid order function for sorting"); | 179 | if (j<l) luaL_verror(L, "invalid order function for sorting"); |
180 | lua_pop(L, 1); /* remove a[j] */ | 180 | lua_pop(L, 1); /* remove a[j] */ |
181 | } | 181 | } |
182 | if (j<i) { | 182 | if (j<i) { |