MCPcopy Create free account
hub / github.com/F-Stack/f-stack / sort

Function sort

app/redis-6.2.6/deps/lua/src/ltablib.c:256–264  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

254}
255
256static int sort (lua_State *L) {
257 int n = aux_getn(L, 1);
258 luaL_checkstack(L, 40, ""); /* assume array is smaller than 2^40 */
259 if (!lua_isnoneornil(L, 2)) /* is there a 2nd argument? */
260 luaL_checktype(L, 2, LUA_TFUNCTION);
261 lua_settop(L, 2); /* make sure there is two arguments */
262 auxsort(L, 1, n);
263 return 0;
264}
265
266/* }====================================================== */
267

Callers

nothing calls this directly

Calls 4

luaL_checkstackFunction · 0.70
luaL_checktypeFunction · 0.70
lua_settopFunction · 0.70
auxsortFunction · 0.70

Tested by

no test coverage detected