| 191 | } |
| 192 | |
| 193 | static 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 |
| 208 | static int require_internal(lua_State *L) |
no test coverage detected