aboutsummaryrefslogtreecommitdiff
path: root/src/lanes.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lanes.cpp')
-rw-r--r--src/lanes.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lanes.cpp b/src/lanes.cpp
index b096774..c820568 100644
--- a/src/lanes.cpp
+++ b/src/lanes.cpp
@@ -836,7 +836,7 @@ static void EnableCrashingOnCrashes(void)
836 836
837// ################################################################################################# 837// #################################################################################################
838 838
839LANES_API int luaopen_lanes_core(lua_State* L_) 839LANES_API int luaopen_lanes_core(lua_State* const L_)
840{ 840{
841#if defined PLATFORM_WIN32 && !defined NDEBUG 841#if defined PLATFORM_WIN32 && !defined NDEBUG
842 EnableCrashingOnCrashes(); 842 EnableCrashingOnCrashes();
@@ -879,7 +879,7 @@ LANES_API int luaopen_lanes_core(lua_State* L_)
879 879
880// ################################################################################################# 880// #################################################################################################
881 881
882[[nodiscard]] static int default_luaopen_lanes(lua_State* L_) 882[[nodiscard]] static int default_luaopen_lanes(lua_State* const L_)
883{ 883{
884 LuaError const _rc{ luaL_loadfile(L_, "lanes.lua") || lua_pcall(L_, 0, 1, 0) }; 884 LuaError const _rc{ luaL_loadfile(L_, "lanes.lua") || lua_pcall(L_, 0, 1, 0) };
885 if (_rc != LuaError::OK) { 885 if (_rc != LuaError::OK) {
@@ -891,7 +891,7 @@ LANES_API int luaopen_lanes_core(lua_State* L_)
891// ################################################################################################# 891// #################################################################################################
892 892
893// call this instead of luaopen_lanes_core() when embedding Lua and Lanes in a custom application 893// call this instead of luaopen_lanes_core() when embedding Lua and Lanes in a custom application
894LANES_API void luaopen_lanes_embedded(lua_State* L_, lua_CFunction _luaopen_lanes) 894LANES_API void luaopen_lanes_embedded(lua_State* const L_, lua_CFunction const luaopen_lanes_)
895{ 895{
896 STACK_CHECK_START_REL(L_, 0); 896 STACK_CHECK_START_REL(L_, 0);
897 // pre-require lanes.core so that when lanes.lua calls require "lanes.core" it finds it is already loaded 897 // pre-require lanes.core so that when lanes.lua calls require "lanes.core" it finds it is already loaded
@@ -899,6 +899,6 @@ LANES_API void luaopen_lanes_embedded(lua_State* L_, lua_CFunction _luaopen_lane
899 lua_pop(L_, 1); // L_: ... 899 lua_pop(L_, 1); // L_: ...
900 STACK_CHECK(L_, 0); 900 STACK_CHECK(L_, 0);
901 // call user-provided function that runs the chunk "lanes.lua" from wherever they stored it 901 // call user-provided function that runs the chunk "lanes.lua" from wherever they stored it
902 luaL_requiref(L_, kLanesLibName, _luaopen_lanes ? _luaopen_lanes : default_luaopen_lanes, 0); // L_: ... lanes 902 luaL_requiref(L_, kLanesLibName, luaopen_lanes_ ? luaopen_lanes_ : default_luaopen_lanes, 0); // L_: ... lanes
903 STACK_CHECK(L_, 1); 903 STACK_CHECK(L_, 1);
904} 904}