swig/Examples/go/simple/simple.c
Ian Lance Taylor 1dca0af024 Update for Go 1.2 release. Add support for linking SWIG code directly
into executable, rather than using a shared library.
2013-12-16 19:50:17 -08:00

18 lines
247 B
C

/* File : example.c */
/* A global variable */
double Foo = 3.0;
/* Compute the greatest common divisor of positive integers */
int gcd(int x, int y) {
int g;
g = y;
while (x > 0) {
g = x;
x = y % x;
y = g;
}
return g;
}