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

Method execute

src/lua/lua_environment.cpp:377–391  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

375}
376
377LuaStack LuaEnvironment::execute(const LuaResource *lr, int nres)
378{
379 LuaStack stack(L);
380 int status;
381
382 status = luaL_loadbuffer(L, lua_resource::program(lr), lr->size, "<unknown>");
383 if (status == LUA_OK)
384 status = this->call(0, nres);
385 if (status != LUA_OK) {
386 report(L, status);
387 device()->pause();
388 }
389
390 return stack;
391}
392
393LuaStack LuaEnvironment::execute_string(const char *s)
394{

Callers 1

reloadMethod · 0.95

Calls 5

callMethod · 0.95
deviceFunction · 0.85
reportFunction · 0.70
luaL_loadbufferFunction · 0.50
pauseMethod · 0.45

Tested by

no test coverage detected