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

Function tsort

freebsd/contrib/openzfs/module/lua/ltablib.c:247–255  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

245}
246
247static int tsort (lua_State *L) {
248 int n = aux_getn(L, 1);
249 luaL_checkstack(L, 40, ""); /* assume array is smaller than 2^40 */
250 if (!lua_isnoneornil(L, 2)) /* is there a 2nd argument? */
251 luaL_checktype(L, 2, LUA_TFUNCTION);
252 lua_settop(L, 2); /* make sure there is two arguments */
253 auxsort(L, 1, n);
254 return 0;
255}
256
257/* }====================================================== */
258

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