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

Function lua_tocfunction

extlibs/lua/src/lapi.c:409–415  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

407
408
409LUA_API lua_CFunction lua_tocfunction (lua_State *L, int idx) {
410 const TValue *o = index2value(L, idx);
411 if (ttislcf(o)) return fvalue(o);
412 else if (ttisCclosure(o))
413 return clCvalue(o)->f;
414 else return NULL; /* not a C function */
415}
416
417
418static void *touserdata (const TValue *o) {

Callers 4

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

Calls 1

index2valueFunction · 0.85

Tested by

no test coverage detected