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

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

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

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

func accessGlobals() {
	_ = C.someValue
}