MCPcopy Create free account
hub / github.com/SatDump/SatDump / lua_tocfunction

Function lua_tocfunction

src-core/libs/lua/lapi.c:438–444  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

436
437
438LUA_API lua_CFunction lua_tocfunction (lua_State *L, int idx) {
439 const TValue *o = index2value(L, idx);
440 if (ttislcf(o)) return fvalue(o);
441 else if (ttisCclosure(o))
442 return clCvalue(o)->f;
443 else return NULL; /* not a C function */
444}
445
446
447l_sinline void *touserdata (const TValue *o) {

Callers 5

getMethod · 0.85
getMethod · 0.85
lua_c_wrapperFunction · 0.85
lua_c_noexcept_wrapperFunction · 0.85
runCFunction · 0.85

Calls 1

index2valueFunction · 0.85

Tested by 1

runCFunction · 0.68