generator.lua: impl defines table.do_sorted

This commit is contained in:
sonoro1234
2026-05-14 09:20:18 +02:00
parent 650a427069
commit 1261b23193

View File

@@ -123,9 +123,10 @@ local serializeTableF = cpp2ffi.serializeTableF
local function func_header_impl_generate(FP, defines) local function func_header_impl_generate(FP, defines)
local outtab = {} local outtab = {}
for k,v in pairs(defines) do --may be key sorting is not enough and declaration order needed
cpp2ffi.table_do_sorted(defines, function(k,v)
table.insert(outtab,"#define "..k.." "..v.."\n") table.insert(outtab,"#define "..k.." "..v.."\n")
end end)
-- for _,t in ipairs(FP.funcdefs) do -- for _,t in ipairs(FP.funcdefs) do
-- if t.cimguiname then -- if t.cimguiname then
-- local cimf = FP.defsT[t.cimguiname] -- local cimf = FP.defsT[t.cimguiname]