From 50f4c40bdb5667aa7053434dede2dd98f6f9e243 Mon Sep 17 00:00:00 2001 From: Benoit Germain Date: Fri, 14 Jun 2024 17:11:36 +0200 Subject: Wording fix: parameter → argument MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/cancel.cpp | 2 +- src/intercopycontext.cpp | 4 ++-- src/keeper.cpp | 4 ++-- src/lane.cpp | 2 +- src/lane.h | 2 +- src/lanes.cpp | 2 +- src/lanes.lua | 14 +++++++------- 7 files changed, 15 insertions(+), 15 deletions(-) (limited to 'src') diff --git a/src/cancel.cpp b/src/cancel.cpp index 990f5d4..755215f 100644 --- a/src/cancel.cpp +++ b/src/cancel.cpp @@ -168,7 +168,7 @@ LUAG_FUNC(thread_cancel) bool _wake_lane{ _op != CancelOp::Soft }; if (lua_gettop(L_) >= 2) { if (!lua_isboolean(L_, 2)) { - raise_luaL_error(L_, "wake_lindas parameter is not a boolean"); + raise_luaL_error(L_, "wake_lindas argument is not a boolean"); } _wake_lane = lua_toboolean(L_, 2); lua_remove(L_, 2); // argument is processed, remove it diff --git a/src/intercopycontext.cpp b/src/intercopycontext.cpp index 34a1c95..85c1ebb 100644 --- a/src/intercopycontext.cpp +++ b/src/intercopycontext.cpp @@ -193,7 +193,7 @@ void InterCopyContext::copyFunction() const // "value returned is the error code returned by the last call // to the writer" (and we only return 0) // not sure this could ever fail but for memory shortage reasons - // last parameter is Lua 5.4-specific (no stripping) + // last argument is Lua 5.4-specific (no stripping) luaL_Buffer B{}; if (luaG_dump(L1, buf_writer, &B, U->stripFunctions) != 0) { raise_luaL_error(getErrL(), "internal error: function dump failed."); @@ -482,7 +482,7 @@ void InterCopyContext::interCopyKeyValuePair() const return; // we could raise an error instead of ignoring the table entry, like so: // raise_luaL_error(L1, "Unable to copy %s key '%s' because of value is of type '%s'", (vt == VT::NORMAL) ? "table" : "metatable", name, luaL_typename(L1, key_i)); - // maybe offer this possibility as a global configuration option, or a linda setting, or as a parameter of the call causing the transfer? + // maybe offer this possibility as a global configuration option, or a linda setting, or as a argument of the call causing the transfer? } char* _valPath{ nullptr }; diff --git a/src/keeper.cpp b/src/keeper.cpp index 7038f2c..e058114 100644 --- a/src/keeper.cpp +++ b/src/keeper.cpp @@ -576,8 +576,8 @@ int keepercall_set(lua_State* const L_) * Call a function ('func_name') in the keeper state, and pass on the returned * values to 'L'. * - * 'linda': deep Linda pointer (used only as a unique table key, first parameter) - * 'starting_index': first of the rest of parameters (none if 0) + * 'linda': deep Linda pointer (used only as a unique table key, first argument) + * 'starting_index': first of the rest of arguments (none if 0) * * Returns: number of return values (pushed to 'L'), unset in case of error */ diff --git a/src/lane.cpp b/src/lane.cpp index e801cba..d4175c6 100644 --- a/src/lane.cpp +++ b/src/lane.cpp @@ -539,7 +539,7 @@ static void push_stack_trace(lua_State* L_, Lane::ErrorTraceLevel errorTraceLeve // ################################################################################################# //--- -// Run finalizers - if any - with the given parameters +// Run finalizers - if any - with the given arguments // // If 'rc' is nonzero, error message and stack index (the latter only when errorTraceLevel_ == 1) are available as: // [-1]: stack trace (table) diff --git a/src/lane.h b/src/lane.h index 4461b37..0426240 100644 --- a/src/lane.h +++ b/src/lane.h @@ -14,7 +14,7 @@ static constexpr RegistryUniqueKey kExtendedStackTraceRegKey{ 0x38147AD48FB426E2 * of functions that Lanes will call after the executing 'pcall' has ended. * * We're NOT using the GC system for finalizer mainly because providing the - * error (and maybe stack trace) parameters to the finalizer functions would + * error (and maybe stack trace) arguments to the finalizer functions would * anyways complicate that approach. */ // xxh64 of string "kFinalizerRegKey" generated at https://www.pelock.com/products/hash-calculator diff --git a/src/lanes.cpp b/src/lanes.cpp index f1aa873..cab5944 100644 --- a/src/lanes.cpp +++ b/src/lanes.cpp @@ -217,7 +217,7 @@ LUAG_FUNC(register) { std::string_view const _name{ luaG_checkstring(L_, 1) }; LuaType const _mod_type{ luaG_type(L_, 2) }; - // ignore extra parameters, just in case + // ignore extra arguments, just in case lua_settop(L_, 2); luaL_argcheck(L_, (_mod_type == LuaType::TABLE) || (_mod_type == LuaType::FUNCTION), 2, "unexpected module type"); DEBUGSPEW_CODE(Universe* _U = Universe::Get(L_)); diff --git a/src/lanes.lua b/src/lanes.lua index c860ba0..29fc4a9 100644 --- a/src/lanes.lua +++ b/src/lanes.lua @@ -158,12 +158,12 @@ local params_checker = function(settings_) -- make a copy of the table to leave the provided one unchanged, *and* to help ensure it won't change behind our back local settings = {} if type(settings_) ~= "table" then - error "Bad parameter #1 to lanes.configure(), should be a table" + error "Bad argument #1 to lanes.configure(), should be a table" end -- any setting unknown to Lanes raises an error for setting, _ in pairs(settings_) do if not param_checkers[setting] then - error("Unknown parameter '" .. setting .. "' in configure options") + error("Unknown argument '" .. setting .. "' in configure options") end end -- any setting not present in the provided parameters takes the default value @@ -176,7 +176,7 @@ local params_checker = function(settings_) param = default_params[key] end if not checker(param) then - error("Bad parameter " .. key .. ": " .. tostring(param), 2) + error("Bad argument " .. key .. ": " .. tostring(param), 2) end settings[key] = param end @@ -291,7 +291,7 @@ local opt_validators = -- -- ... (more options may be introduced later) ... -- --- Calling with a function parameter ('lane_func') ends the string/table +-- Calling with a function argument ('lane_func') ends the string/table -- modifiers, and prepares a lane generator. -- receives a sequence of strings and tables, plus a function @@ -306,7 +306,7 @@ local gen = function(...) -- we need at least a function if n == 0 then - error("No parameters!", 2) + error("No arguments!", 2) end -- all arguments but the last must be nil, strings, or tables @@ -322,7 +322,7 @@ local gen = function(...) elseif v == nil then -- skip else - error("Bad parameter " .. i .. ": " .. tv .. " " .. string_format("%q", tostring(v)), 2) + error("Bad argument " .. i .. ": " .. tv .. " " .. string_format("%q", tostring(v)), 2) end end @@ -330,7 +330,7 @@ local gen = function(...) local func = select(n, ...) local functype = type(func) if functype ~= "function" and functype ~= "string" then - error("Last parameter not function or string: " .. functype .. " " .. string_format("%q", tostring(func)), 2) + error("Last argument not function or string: " .. functype .. " " .. string_format("%q", tostring(func)), 2) end -- check that the caller only provides reserved library names, and those only once -- cgit v1.2.3-55-g6feb