mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-10 22:13:39 +00:00
cgo: add support for variadic functions
This doesn't yet add support for actually making use of variadic
functions, but at least allows (unintended) variadic functions like the
following to work:
void foo();
This commit is contained in:
committed by
Ron Evans
parent
5502182642
commit
2e9c3a1d8d
Vendored
+4
@@ -36,6 +36,10 @@ func main() {
|
||||
cb = C.binop_t(C.mul)
|
||||
println("callback 2:", C.doCallback(20, 30, cb))
|
||||
|
||||
// variadic functions
|
||||
println("variadic0:", C.variadic0())
|
||||
println("variadic2:", C.variadic2(3, 5))
|
||||
|
||||
// equivalent types
|
||||
var goInt8 int8 = 5
|
||||
var _ C.int8_t = goInt8
|
||||
|
||||
Reference in New Issue
Block a user