| 391 | } |
| 392 | |
| 393 | LuaStack LuaEnvironment::execute_string(const char *s) |
| 394 | { |
| 395 | LuaStack stack(L); |
| 396 | int status; |
| 397 | |
| 398 | status = luaL_loadstring(L, s); |
| 399 | if (status == LUA_OK) |
| 400 | status = this->call(0, 0); |
| 401 | if (status != LUA_OK) { |
| 402 | report(L, status); |
| 403 | device()->pause(); |
| 404 | } |
| 405 | |
| 406 | CE_ASSERT(lua_gettop(L) == 0, "Stack not clean"); |
| 407 | return stack; |
| 408 | } |
| 409 | |
| 410 | void LuaEnvironment::add_module_function(const char *module, const char *name, const lua_CFunction func) |
| 411 | { |
no test coverage detected