diff options
author | Dave Beazley <dave-swig@dabeaz.com> | 2003-05-29 18:30:10 +0000 |
---|---|---|
committer | Dave Beazley <dave-swig@dabeaz.com> | 2003-05-29 18:30:10 +0000 |
commit | 53ef3e4ac770a3a229fda769a723717300480b56 (patch) | |
tree | 950d3d4fda20e40070937ada099a3c244973f163 /Examples/test-suite/array_member.i | |
parent | 1d590457ba7f1b35cc0f96a005866727de940820 (diff) | |
download | swig-53ef3e4ac770a3a229fda769a723717300480b56.tar.gz |
new test
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4835 626c5289-ae23-0410-ae9c-e8d60b6d4f22
Diffstat (limited to 'Examples/test-suite/array_member.i')
-rw-r--r-- | Examples/test-suite/array_member.i | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/Examples/test-suite/array_member.i b/Examples/test-suite/array_member.i new file mode 100644 index 000000000..a80e92aa4 --- /dev/null +++ b/Examples/test-suite/array_member.i @@ -0,0 +1,24 @@ +%module array_member + +%inline %{ + +typedef struct Foo { + char text[8]; + int data[8]; +} Foo; + +int global_data[8] = { 0,1,2,3,4,5,6,7 }; + +void set_value(int *x, int i, int v) { + x[i] = v; +} + +int get_value(int *x, int i) { + return x[i]; +} +%} + + + + + |