aboutsummaryrefslogtreecommitdiff
path: root/src/state.cpp
diff options
context:
space:
mode:
authorBenoit Germain <benoit.germain@ubisoft.com>2025-03-14 11:32:58 +0100
committerBenoit Germain <benoit.germain@ubisoft.com>2025-03-14 11:32:58 +0100
commitdee0756ff21c1f7dd4eea067dfb90feb1ba4763d (patch)
tree981ddd4ddc22bc1fae54ce3e0034da746571fb1a /src/state.cpp
parent536a64557c82c350fd73ea64c6d4dd1737896579 (diff)
downloadlanes-dee0756ff21c1f7dd4eea067dfb90feb1ba4763d.tar.gz
lanes-dee0756ff21c1f7dd4eea067dfb90feb1ba4763d.tar.bz2
lanes-dee0756ff21c1f7dd4eea067dfb90feb1ba4763d.zip
lanes/core.[so|dll] → lanes_core.[so|dll]
Diffstat (limited to 'src/state.cpp')
-rw-r--r--src/state.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/state.cpp b/src/state.cpp
index 6fabc5f..b558d11 100644
--- a/src/state.cpp
+++ b/src/state.cpp
@@ -99,9 +99,9 @@ namespace {
99 DEBUGSPEW_CODE(DebugSpew(Universe::Get(L_)) << "opening '" << _name << "' library" << std::endl); 99 DEBUGSPEW_CODE(DebugSpew(Universe::Get(L_)) << "opening '" << _name << "' library" << std::endl);
100 STACK_CHECK_START_REL(L_, 0); 100 STACK_CHECK_START_REL(L_, 0);
101 // open the library as if through require(), and create a global as well if necessary (the library table is left on the stack) 101 // open the library as if through require(), and create a global as well if necessary (the library table is left on the stack)
102 bool const _isLanesCore{ _libfunc == luaopen_lanes_core }; // don't want to create a global for "lanes.core" 102 bool const _isLanesCore{ _libfunc == luaopen_lanes_core }; // don't want to create a global for "lanes_core"
103 luaL_requiref(L_, _name.data(), _libfunc, !_isLanesCore); // L_: {lib} 103 luaL_requiref(L_, _name.data(), _libfunc, !_isLanesCore); // L_: {lib}
104 // lanes.core doesn't declare a global, so scan it here and now 104 // lanes_core doesn't declare a global, so scan it here and now
105 if (_isLanesCore) { 105 if (_isLanesCore) {
106 tools::PopulateFuncLookupTable(L_, kIdxTop, _name); 106 tools::PopulateFuncLookupTable(L_, kIdxTop, _name);
107 } 107 }
@@ -224,7 +224,7 @@ namespace state {
224 if (_libs == "*") { 224 if (_libs == "*") {
225 DEBUGSPEW_CODE(DebugSpew(U_) << "opening ALL standard libraries" << std::endl); 225 DEBUGSPEW_CODE(DebugSpew(U_) << "opening ALL standard libraries" << std::endl);
226 luaL_openlibs(_L); 226 luaL_openlibs(_L);
227 // don't forget lanes.core for regular lane states 227 // don't forget lanes_core for regular lane states
228 Open1Lib(_L, kLanesCoreLibName); 228 Open1Lib(_L, kLanesCoreLibName);
229 _libs = ""; // done with libs 229 _libs = ""; // done with libs
230 } else { 230 } else {
@@ -248,7 +248,6 @@ namespace state {
248 248
249 // scan all libraries, open them one by one 249 // scan all libraries, open them one by one
250 auto isLibNameChar = [](char const c_) { 250 auto isLibNameChar = [](char const c_) {
251 // '.' can be part of name for "lanes.core"
252 return std::isalnum(c_) || c_ == '.' || c_ == '-' || c_ == '_'; 251 return std::isalnum(c_) || c_ == '.' || c_ == '-' || c_ == '_';
253 }; 252 };
254 while (!_libs.empty()) { 253 while (!_libs.empty()) {