mirror of
https://github.com/radio95-rnt/rds95.git
synced 2026-02-26 20:33:53 +01:00
there
This commit is contained in:
@@ -8,6 +8,7 @@ static uint8_t unload_refs[33] = {LUA_REFNIL};
|
|||||||
static uint8_t lua_reload_scheduled = 0;
|
static uint8_t lua_reload_scheduled = 0;
|
||||||
|
|
||||||
int lua_reload_command(lua_State* localL) {
|
int lua_reload_command(lua_State* localL) {
|
||||||
|
(void)localL;
|
||||||
lua_reload_scheduled = 1;
|
lua_reload_scheduled = 1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -694,12 +695,10 @@ void reload_lua() {
|
|||||||
}
|
}
|
||||||
} else lua_pop(L, 1);
|
} else lua_pop(L, 1);
|
||||||
|
|
||||||
if (unload_refs) {
|
for (int i = 1; i < *unload_refs; i++) {
|
||||||
for (int i = 1; i < *unload_refs; i++) {
|
luaL_unref(L, LUA_REGISTRYINDEX, unload_refs[i]);
|
||||||
luaL_unref(L, LUA_REGISTRYINDEX, unload_refs[i]);
|
|
||||||
}
|
|
||||||
*unload_refs = 1;
|
|
||||||
}
|
}
|
||||||
|
*unload_refs = 1;
|
||||||
|
|
||||||
if (L) {
|
if (L) {
|
||||||
lua_close(L);
|
lua_close(L);
|
||||||
|
|||||||
Reference in New Issue
Block a user