aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSunil Nimmagadda <sunil@nimmagadda.net>2026-10-30 14:53:56 +0530
committerSunil Nimmagadda <sunil@nimmagadda.net>2026-10-30 14:53:56 +0530
commit4e18b16d5c559f31e4f71458fce3976f237203f1 (patch)
tree82dc86ad1d8d212c0c0d708ca1b21bc87b3af927
parentdb01f20df11a164b9e2a98edb866a65ab369c7bb (diff)
Return the correct table from loadconfig.
-rw-r--r--mkelf.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/mkelf.lua b/mkelf.lua
index b22f064..24b10a3 100644
--- a/mkelf.lua
+++ b/mkelf.lua
@@ -47,16 +47,18 @@ local function loadconfig(fn)
segment:normalize()
segment:validate()
end
+ segments = t
end,
sections = function(t)
if type(t) ~= "table" then
error("sections must be a table", 2)
end
for _, section in ipairs(t) do
- section = setmetatable(t, section_mt)
+ section = setmetatable(section, section_mt)
section:normalize()
section:validate()
end
+ sections = t
end,
},
__newindex = function(_, name)