MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / createRawFunction

Method createRawFunction

source/core/StarLua.cpp:1171–1176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1169}
1170
1171LuaFunction LuaEngine::createRawFunction(lua_CFunction function) {
1172 lua_checkstack(m_state, 2);
1173
1174 lua_pushcfunction(m_state, function);
1175 return LuaFunction(LuaDetail::LuaHandle(RefPtr<LuaEngine>(this), popHandle(m_state)));
1176}
1177
1178LuaFunction LuaEngine::createFunctionFromSource(int handleIndex, char const* contents, size_t size, char const* name) {
1179 lua_checkstack(m_state, 2);

Callers

nothing calls this directly

Calls 3

lua_checkstackFunction · 0.85
LuaFunctionClass · 0.85
LuaHandleClass · 0.85

Tested by

no test coverage detected