Update for Go 1.2 release. Add support for linking SWIG code directly
into executable, rather than using a shared library.
This commit is contained in:
parent
39bf2efdc9
commit
1dca0af024
32 changed files with 385 additions and 371 deletions
18
Examples/go/simple/simple.c
Normal file
18
Examples/go/simple/simple.c
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
/* 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;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue