Global variable and function handling from C to C.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2008-maciekd@10526 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Maciej Drwal 2008-06-16 15:27:36 +00:00
commit a5b8db8296
6 changed files with 106 additions and 41 deletions

View file

@ -3,6 +3,14 @@
/* A global variable */
double Foo = 3.0;
double *Foo_ptr = &Foo;
char *my_str = "hello, world!";
char *array_of_strs[] = { "one", "two" };
char *get_str(int i) {
return array_of_strs[i];
}
/* Compute the greatest common divisor of positive integers */
int gcd(int x, int y) {
int g;