Mercurial > pub > dyncall > dyncall
diff test/call_suite/mk-cases.lua @ 511:a0c51f34023a
test/call_suite:
- less confusing and simpler generated code (with first arg in V_?[0] output)
- avoid using same test reference value for retval and last arg
author | Tassilo Philipp |
---|---|
date | Sat, 09 Apr 2022 23:48:01 +0200 |
parents | ed7d1f5e7973 |
children | 4d0541bf9b38 |
line wrap: on
line diff
--- a/test/call_suite/mk-cases.lua Sat Apr 09 23:45:44 2022 +0200 +++ b/test/call_suite/mk-cases.lua Sat Apr 09 23:48:01 2022 +0200 @@ -10,12 +10,12 @@ local pos = 0 maxargs = max(maxargs, #sig-2) for i = 1, #sig-2 do - pos = tostring(i) local name = "a"..pos local ch = sig:sub(i,i) h[#h+1] = ch.." "..name h[#h+1] = "," t[#t+1] = "V_"..ch.."["..pos.."]="..name..";" + pos = pos + 1 end h[#h] = "){" t[#t+1] = "ret_"..sig:sub(-1).."("..pos..")}\n"