MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / sort

Function sort

Source/Misc/lua/src/lua.c:14802–14810  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14800}
14801
14802static int sort (lua_State *L) {
14803int n = aux_getn(L, 1);
14804luaL_checkstack(L, 40, ""); /* assume array is smaller than 2^40 */
14805if (!lua_isnoneornil(L, 2)) /* is there a 2nd argument? */
14806luaL_checktype(L, 2, LUA_TFUNCTION);
14807lua_settop(L, 2); /* make sure there is two arguments */
14808auxsort(L, 1, n);
14809return 0;
14810}
14811
14812/* }====================================================== */
14813

Callers

nothing calls this directly

Calls 4

luaL_checkstackFunction · 0.85
luaL_checktypeFunction · 0.85
lua_settopFunction · 0.85
auxsortFunction · 0.85

Tested by

no test coverage detected