| 463 | } |
| 464 | |
| 465 | void LuaEnvironment::set_module_number(const char *module, const char *name, f64 value) |
| 466 | { |
| 467 | // Create module if it does not exist |
| 468 | luaL_Reg entry; |
| 469 | entry.name = NULL; |
| 470 | entry.func = NULL; |
| 471 | luaL_register(L, module, &entry); |
| 472 | lua_pop(L, 1); |
| 473 | |
| 474 | lua_getglobal(L, module); |
| 475 | lua_pushnumber(L, value); |
| 476 | lua_setfield(L, -2, name); |
| 477 | lua_pop(L, 1); |
| 478 | } |
| 479 | |
| 480 | int LuaEnvironment::call(int narg, int nres) |
| 481 | { |
no test coverage detected