MCPcopy Create free account
hub / github.com/SOUI2/soui / class_con

Function class_con

components/ScriptModule-LUA/lua_tinker/lua_tinker.h:828–840  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

826 // Tinker Class Constructor
827 template<typename T, typename F>
828 void class_con(lua_State* L,F func)
829 {
830 push_meta(L, class_name<T>::name());
831 if(lua_istable(L, -1))
832 {
833 lua_newtable(L);
834 lua_pushstring(L, "__call");
835 lua_pushcclosure(L, func, 0);
836 lua_rawset(L, -3);
837 lua_setmetatable(L, -2);
838 }
839 lua_pop(L, 1);
840 }
841
842 // Tinker Class Functions
843 template<typename T, typename F>

Callers

nothing calls this directly

Calls 5

nameFunction · 0.85
lua_pushstringFunction · 0.85
lua_pushcclosureFunction · 0.85
lua_rawsetFunction · 0.85
lua_setmetatableFunction · 0.85

Tested by

no test coverage detected