Mercurial > pub > dyncall > dyncall
changeset 516:1a813b706de4
callback_suite: fixed 'ordered' mode config (was missing first line)
author | Tassilo Philipp |
---|---|
date | Sun, 10 Apr 2022 22:03:16 +0200 |
parents | c9c546f8598b |
children | f8856e29b512 |
files | test/callback_suite/config.lua test/callback_suite/make-signatures.lua test/callback_suite/mk-cases.lua |
diffstat | 3 files changed, 5 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/test/callback_suite/config.lua Sun Apr 10 21:05:33 2022 +0200 +++ b/test/callback_suite/config.lua Sun Apr 10 22:03:16 2022 +0200 @@ -1,4 +1,4 @@ --- auto-generated file from template config-random.lua (created by GNUmake) +-- auto-generated file from template config-random.lua (created by make) -- section 'main' -------------------------------------------------------------- ncases = 800 -- number of test cases (note: inf loop if higher than max arg permutation) @@ -28,5 +28,4 @@ api = "" -- calling convention ("__stdcall" or "__fastcall") -- for gcc use "__attribute__((__stdcall__))" or "__attribute__((__fastcall__))" - -- for ms ? ccprefix = "" -- signature prefix ("_s" (stdcall), "_f" (gcc fastcall) or "_F" (microsoft fastcall))
--- a/test/callback_suite/make-signatures.lua Sun Apr 10 21:05:33 2022 +0200 +++ b/test/callback_suite/make-signatures.lua Sun Apr 10 22:03:16 2022 +0200 @@ -12,10 +12,9 @@ function orderedSignature(x) local signature = "" local typeindex - local nargtypes = string.len(types) - while true do - if x < nargtypes then break end - typeindex = 1 + math.mod(x, nargtypes) + local nargtypes = #types + while x >= nargtypes do + typeindex = 1 + (x % nargtypes) signature = signature .. string.sub(types, typeindex, typeindex) x = math.floor( x / nargtypes ) end @@ -27,7 +26,7 @@ function orderedSignatures() local i - for i = 1, ncases do + for i = 0, ncases-1 do io.write( orderedSignature(offset+i*step) .. "\n" ) end end
--- a/test/callback_suite/mk-cases.lua Sun Apr 10 21:05:33 2022 +0200 +++ b/test/callback_suite/mk-cases.lua Sun Apr 10 22:03:16 2022 +0200 @@ -26,11 +26,6 @@ end function mkall() - -- force minargs for ordered mode - if mode == "ordered" then - minargs = 0 - end - -- case macros local i for i = minargs, maxargs do