aboutsummaryrefslogtreecommitdiff
path: root/src/state.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/state.cpp')
-rw-r--r--src/state.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/state.cpp b/src/state.cpp
index 2a69a46..379b63e 100644
--- a/src/state.cpp
+++ b/src/state.cpp
@@ -200,15 +200,15 @@ static void copy_one_time_settings(Universe* U, SourceState L1, DestState L2)
200 200
201 DEBUGSPEW_CODE(fprintf( stderr, INDENT_BEGIN "copy_one_time_settings()\n" INDENT_END)); 201 DEBUGSPEW_CODE(fprintf( stderr, INDENT_BEGIN "copy_one_time_settings()\n" INDENT_END));
202 202
203 CONFIG_REGKEY.pushValue(L1); // config 203 kConfigRegKey.pushValue(L1); // config
204 // copy settings from from source to destination registry 204 // copy settings from from source to destination registry
205 InterCopyContext c{ U, L2, L1, {}, {}, {}, {}, {} }; 205 InterCopyContext c{ U, L2, L1, {}, {}, {}, {}, {} };
206 if (c.inter_move(1) != InterCopyResult::Success) // // config 206 if (c.inter_move(1) != InterCopyResult::Success) // // config
207 { 207 {
208 luaL_error(L1, "failed to copy settings when loading lanes.core"); // doesn't return 208 luaL_error(L1, "failed to copy settings when loading lanes.core"); // doesn't return
209 } 209 }
210 // set L2:_R[CONFIG_REGKEY] = settings 210 // set L2:_R[kConfigRegKey] = settings
211 CONFIG_REGKEY.setValue(L2, [](lua_State* L) { lua_insert(L, -2); }); // config 211 kConfigRegKey.setValue(L2, [](lua_State* L) { lua_insert(L, -2); }); // config
212 STACK_CHECK(L2, 0); 212 STACK_CHECK(L2, 0);
213 STACK_CHECK(L1, 0); 213 STACK_CHECK(L1, 0);
214} 214}
@@ -301,7 +301,7 @@ void call_on_state_create(Universe* U, lua_State* L, lua_State* from_, LookupMod
301 STACK_CHECK(L, 0); 301 STACK_CHECK(L, 0);
302 return; 302 return;
303 } 303 }
304 CONFIG_REGKEY.pushValue(L); // {} 304 kConfigRegKey.pushValue(L); // {}
305 STACK_CHECK(L, 1); 305 STACK_CHECK(L, 1);
306 lua_getfield(L, -1, "on_state_create"); // {} on_state_create() 306 lua_getfield(L, -1, "on_state_create"); // {} on_state_create()
307 lua_remove(L, -2); // on_state_create() 307 lua_remove(L, -2); // on_state_create()
@@ -344,7 +344,7 @@ lua_State* luaG_newstate(Universe* U, SourceState from_, char const* libs_)
344 STACK_CHECK(L, 0); 344 STACK_CHECK(L, 0);
345 345
346 // we'll need this every time we transfer some C function from/to this state 346 // we'll need this every time we transfer some C function from/to this state
347 LOOKUP_REGKEY.setValue(L, [](lua_State* L) { lua_newtable(L); }); 347 kLookupRegKey.setValue(L, [](lua_State* L) { lua_newtable(L); });
348 STACK_CHECK(L, 0); 348 STACK_CHECK(L, 0);
349 349
350 // neither libs (not even 'base') nor special init func: we are done 350 // neither libs (not even 'base') nor special init func: we are done
@@ -427,7 +427,7 @@ lua_State* luaG_newstate(Universe* U, SourceState from_, char const* libs_)
427 427
428#if 1 && USE_DEBUG_SPEW() 428#if 1 && USE_DEBUG_SPEW()
429 // dump the lookup database contents 429 // dump the lookup database contents
430 LOOKUP_REGKEY.pushValue(L); // {} 430 kLookupRegKey.pushValue(L); // {}
431 lua_pushnil(L); // {} nil 431 lua_pushnil(L); // {} nil
432 while (lua_next(L, -2)) // {} k v 432 while (lua_next(L, -2)) // {} k v
433 { 433 {