MCPcopy Create free account
hub / github.com/PlutoLang/Pluto / lua_CFunction lua_tocfunction

Function lua_CFunction lua_tocfunction

src/lapi.cpp:502–508  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

500
501
502LUA_API lua_CFunction lua_tocfunction (lua_State *L, int idx) {
503 const TValue *o = index2value(L, idx);
504 if (ttislcf(o)) return fvalue(o);
505 else if (ttisCclosure(o))
506 return clCvalue(o)->f;
507 else return NULL; /* not a C function */
508}
509
510
511l_sinline void *touserdata (const TValue *o) {

Callers

nothing calls this directly

Calls 1

index2valueFunction · 0.85

Tested by

no test coverage detected