| 709 | } |
| 710 | |
| 711 | void SetInstance(lua_State* L) |
| 712 | { |
| 713 | // [-1] instance |
| 714 | |
| 715 | lua_pushinteger(L, (lua_Integer)INSTANCE_NAME_HASH); |
| 716 | // [-1] name_hash |
| 717 | // [-2] instance |
| 718 | |
| 719 | lua_insert(L, -2); |
| 720 | // [-1] instance |
| 721 | // [-2] name_hash |
| 722 | |
| 723 | lua_settable(L, LUA_GLOBALSINDEX); |
| 724 | } |
| 725 | |
| 726 | bool IsInstanceValid(lua_State* L) |
| 727 | { |