aboutsummaryrefslogtreecommitdiff
path: root/src/linda.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/linda.cpp')
-rw-r--r--src/linda.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/linda.cpp b/src/linda.cpp
index fb74abe..39977bc 100644
--- a/src/linda.cpp
+++ b/src/linda.cpp
@@ -804,7 +804,7 @@ LUAG_FUNC(linda_concat)
804LUAG_FUNC(linda_dump) 804LUAG_FUNC(linda_dump)
805{ 805{
806 Linda* const linda{ lua_toLinda<false>(L, 1) }; 806 Linda* const linda{ lua_toLinda<false>(L, 1) };
807 return keeper_push_linda_storage(linda->U, L, linda, linda->hashSeed()); 807 return keeper_push_linda_storage(linda->U, Dest{ L }, linda, linda->hashSeed());
808} 808}
809 809
810// ################################################################################################# 810// #################################################################################################
@@ -816,7 +816,7 @@ LUAG_FUNC(linda_dump)
816LUAG_FUNC(linda_towatch) 816LUAG_FUNC(linda_towatch)
817{ 817{
818 Linda* const linda{ lua_toLinda<false>(L, 1) }; 818 Linda* const linda{ lua_toLinda<false>(L, 1) };
819 int pushed{ keeper_push_linda_storage(linda->U, L, linda, linda->hashSeed()) }; 819 int pushed{ keeper_push_linda_storage(linda->U, Dest{ L }, linda, linda->hashSeed()) };
820 if (pushed == 0) 820 if (pushed == 0)
821 { 821 {
822 // if the linda is empty, don't return nil 822 // if the linda is empty, don't return nil
@@ -1009,11 +1009,11 @@ static void* linda_id( lua_State* L, DeepOp op_)
1009 */ 1009 */
1010LUAG_FUNC(linda) 1010LUAG_FUNC(linda)
1011{ 1011{
1012 int const top = lua_gettop(L); 1012 int const top{ lua_gettop(L) };
1013 luaL_argcheck(L, top <= 2, top, "too many arguments"); 1013 luaL_argcheck(L, top <= 2, top, "too many arguments");
1014 if (top == 1) 1014 if (top == 1)
1015 { 1015 {
1016 int const t = lua_type(L, 1); 1016 int const t{ lua_type(L, 1) };
1017 luaL_argcheck(L, t == LUA_TSTRING || t == LUA_TNUMBER, 1, "wrong parameter (should be a string or a number)"); 1017 luaL_argcheck(L, t == LUA_TSTRING || t == LUA_TNUMBER, 1, "wrong parameter (should be a string or a number)");
1018 } 1018 }
1019 else if (top == 2) 1019 else if (top == 2)
@@ -1021,5 +1021,5 @@ LUAG_FUNC(linda)
1021 luaL_checktype(L, 1, LUA_TSTRING); 1021 luaL_checktype(L, 1, LUA_TSTRING);
1022 luaL_checktype(L, 2, LUA_TNUMBER); 1022 luaL_checktype(L, 2, LUA_TNUMBER);
1023 } 1023 }
1024 return luaG_newdeepuserdata(L, linda_id, 0); 1024 return luaG_newdeepuserdata(Dest{ L }, linda_id, 0);
1025} 1025}