aboutsummaryrefslogtreecommitdiffhomepage
path: root/cgo/testdata/symbols.go
blob: c724cd921d7dfecfa4dbac725fb0af9083b7c93b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package main

/*
// Function signatures.
int foo(int a, int b);
void variadic0();
void variadic2(int x, int y, ...);

// Global variable signatures.
extern int someValue;
*/
import "C"

// Test function signatures.
func accessFunctions() {
	C.foo(3, 4)
	C.variadic0()
	C.variadic2(3, 5)
}

func accessGlobals() {
	_ = C.someValue
}