Mercurial > pub > dyncall > dyncall
annotate test/callback_suite/make-invokers.lua @ 0:3e629dc19168
initial from svn dyncall-1745
author | Daniel Adler |
---|---|
date | Thu, 19 Mar 2015 22:24:28 +0100 |
parents | |
children |
rev | line source |
---|---|
0 | 1 require "config" |
2 local id = 1 | |
3 for signature in io.lines() do | |
4 local nargs = string.len(signature) - 2 | |
5 local rtype = string.sub(signature, nargs + 2, nargs + 2) | |
6 local outline = "F" .. nargs .. "(f" .. id .. "," .. rtype | |
7 for i = 1, nargs do | |
8 local type = string.sub(signature, i, i) | |
9 outline = outline .. "," .. type | |
10 end | |
11 outline = outline .. ")\n" | |
12 io.write( outline ) | |
13 id = id + 1 | |
14 end | |
15 io.flush() | |
16 |