MCPcopy Create free account
hub / github.com/crownengine/crown / loader

Function loader

src/lua/lua_environment.cpp:193–205  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

191}
192
193static int loader(lua_State *L)
194{
195 LuaStack stack(L, +1);
196 int status;
197
198 const LuaResource *lr = (LuaResource *)device()->_resource_manager->get(RESOURCE_TYPE_SCRIPT, stack.get_resource_name(1));
199 status = luaL_loadbuffer(L, lua_resource::program(lr), lr->size, "");
200 if (status != LUA_OK) {
201 report(L, status);
202 device()->pause();
203 }
204 return 1;
205}
206
207#if CROWN_DEBUG
208static int require_internal(lua_State *L)

Callers 1

load_image_blockFunction · 0.85

Calls 5

deviceFunction · 0.85
reportFunction · 0.70
luaL_loadbufferFunction · 0.50
getMethod · 0.45
pauseMethod · 0.45

Tested by

no test coverage detected