Better handling of return values. Some bugfixes.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2008-maciekd@10618 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Maciej Drwal 2008-07-01 10:30:40 +00:00
commit f74439e215
16 changed files with 208 additions and 58 deletions

View file

@ -7,7 +7,7 @@ double *Foo_ptr = &Foo;
char *my_str = "hello, world!";
char *array_of_strs[] = { "one", "two" };
char *get_str(int i) {
char *get_str(int i, void* ptr, float ff) {
return array_of_strs[i];
}

View file

@ -6,7 +6,7 @@ extern double Foo;
extern double *Foo_ptr;
extern char *my_str;
extern char **array_of_strs;
extern char *get_str(int i);
extern char *get_str(int i, void* ptr, float ff);
extern int gcd(int x, int y);
%}

View file

@ -9,8 +9,7 @@ int main(int argc, char **argv) {
printf("Foo by ptr is \%f\n", *Foo_ptr);
printf("my_str is: %s\n", my_str);
printf("GCD(%d, %d)=%d\n", a, b, gcd(a, b));
printf("array_of_strs contains %s and %s\n", get_str(0), get_str(1));
printf("const Val = %d\n", Val);
printf("array_of_strs contains %s and %s\n", get_str(0, 0, 0), get_str(1, 0, 0));
return 0;
}