aboutsummaryrefslogtreecommitdiff
path: root/src/state.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/state.cpp')
-rw-r--r--src/state.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/state.cpp b/src/state.cpp
index 85ad31e..2213297 100644
--- a/src/state.cpp
+++ b/src/state.cpp
@@ -174,13 +174,13 @@ static void open1lib( DEBUGSPEW_PARAM_COMMA( Universe* U) lua_State* L, char con
174 name_ = libs[i].name; // note that the provided name_ doesn't necessarily ends with '\0', hence len_ 174 name_ = libs[i].name; // note that the provided name_ doesn't necessarily ends with '\0', hence len_
175 if( libfunc != NULL) 175 if( libfunc != NULL)
176 { 176 {
177 bool_t const isLanesCore = (libfunc == require_lanes_core) ? TRUE : FALSE; // don't want to create a global for "lanes.core" 177 bool const isLanesCore{ libfunc == require_lanes_core }; // don't want to create a global for "lanes.core"
178 DEBUGSPEW_CODE( fprintf( stderr, INDENT_BEGIN "opening %.*s library\n" INDENT_END, (int) len_, name_)); 178 DEBUGSPEW_CODE( fprintf( stderr, INDENT_BEGIN "opening %.*s library\n" INDENT_END, (int) len_, name_));
179 STACK_CHECK( L, 0); 179 STACK_CHECK( L, 0);
180 // open the library as if through require(), and create a global as well if necessary (the library table is left on the stack) 180 // open the library as if through require(), and create a global as well if necessary (the library table is left on the stack)
181 luaL_requiref( L, name_, libfunc, !isLanesCore); 181 luaL_requiref( L, name_, libfunc, !isLanesCore);
182 // lanes.core doesn't declare a global, so scan it here and now 182 // lanes.core doesn't declare a global, so scan it here and now
183 if( isLanesCore == TRUE) 183 if( isLanesCore == true)
184 { 184 {
185 populate_func_lookup_table( L, -1, name_); 185 populate_func_lookup_table( L, -1, name_);
186 } 186 }