MCPcopy Create free account
hub / github.com/DFHack/dfhack / dfhack_curry

Function dfhack_curry

library/LuaTools.cpp:1463–1474  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1461}
1462
1463static int dfhack_curry(lua_State *L)
1464{
1465 luaL_checkany(L, 1);
1466 if (lua_isnil(L, 1))
1467 luaL_argerror(L, 1, "nil function in curry");
1468 if (lua_gettop(L) == 1)
1469 return 1;
1470 lua_pushinteger(L, lua_gettop(L));
1471 lua_insert(L, 1);
1472 lua_pushcclosure(L, dfhack_curry_wrap, lua_gettop(L));
1473 return 1;
1474}
1475
1476bool Lua::IsCoreContext(lua_State *state)
1477{

Callers

nothing calls this directly

Calls 5

luaL_checkanyFunction · 0.85
luaL_argerrorFunction · 0.85
lua_gettopFunction · 0.85
lua_pushintegerFunction · 0.85
lua_pushcclosureFunction · 0.85

Tested by

no test coverage detected