add complex matrix support

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2009-sploving@11330 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Baozeng Ding 2009-06-29 15:27:06 +00:00
commit 86a125e910
5 changed files with 118 additions and 59 deletions

View file

@ -23,6 +23,9 @@ char cvar = 0;
float fvar = 0;
double dvar = 0;
char *strvar=0;
double *Foo1;
double *Foo2;
/* A debugging function to print out their values */

View file

@ -17,6 +17,8 @@
extern float fvar;
extern double dvar;
extern char *strvar;
extern double *Foo1;
extern double *Foo2;
%}

View file

@ -18,6 +18,8 @@ cvar_set ("S");
fvar_set (3.14159);
dvar_set (2.1828);
strvar_set("Hello World");
Foo1_set([1,2,3;4,5,6]);
Foo2_set([1+2*%i,2+3*%i;3+4*%i,7+8*%i]);
// Now print out the values of the variables
@ -35,6 +37,8 @@ printf("fvar = %f\n", fvar_get());
printf("dvar = %f\n", dvar_get());
printf("cvar = %s\n", cvar_get());
printf("strvar = %s\n", strvar_get());
Foo1_get();
Foo2_get();
printf("\nVariables (values printed from C)\n");