aboutsummaryrefslogtreecommitdiffstats
path: root/lualib/lua_util.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lualib/lua_util.lua')
-rw-r--r--lualib/lua_util.lua13
1 files changed, 13 insertions, 0 deletions
diff --git a/lualib/lua_util.lua b/lualib/lua_util.lua
index c2bdf40a9..289e2ed3a 100644
--- a/lualib/lua_util.lua
+++ b/lualib/lua_util.lua
@@ -619,6 +619,19 @@ end
exports.table_cmp = table_cmp
--[[[
+-- @function lua_util.table_merge(t1, t2)
+-- Merge two tables
+--]]
+local function table_merge(t1, t2)
+ for k, v in pairs(t2) do
+ t1[k] = v
+ end
+ return t1
+end
+
+exports.table_merge = table_merge
+
+--[[[
-- @function lua_util.table_cmp(task, name, value, stop_chars)
-- Performs header folding
--]]