swig/Examples/lua/embed2/example.c
Mark Gossage 8350c724f5 [lua] updated docs for exceptions
added new examples (exception,embed2)
update typmaps

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10300 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-03-06 09:44:48 +00:00

22 lines
360 B
C

/* File : example.c */
#include <stdio.h>
/* 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;
}
void greeting() {
printf("Hello from the C function 'greeting'\n");
}