MCPcopy Create free account
hub / github.com/Cubitect/cubiomes-viewer / lua_tocfunction

Function lua_tocfunction

lua/src/lapi.c:442–448  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

index2valueFunction · 0.85

Tested by

no test coverage detected