| 247 | } |
| 248 | |
| 249 | static int sort (lua_State *L) { |
| 250 | int n = aux_getn(L, 1); |
| 251 | luaL_checkstack(L, 40, ""); /* assume array is smaller than 2^40 */ |
| 252 | if (!lua_isnoneornil(L, 2)) /* is there a 2nd argument? */ |
| 253 | luaL_checktype(L, 2, LUA_TFUNCTION); |
| 254 | lua_settop(L, 2); /* make sure there is two arguments */ |
| 255 | auxsort(L, 1, n); |
| 256 | return 0; |
| 257 | } |
| 258 | |
| 259 | /* }====================================================== */ |
| 260 |
nothing calls this directly
no test coverage detected