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:
parent
d828791f56
commit
a5b8db8296
6 changed files with 106 additions and 41 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue