Upstream version 1.3.40
[profile/ivi/swig.git] / Examples / test-suite / li_carrays.i
1 %module li_carrays
2
3 %warnfilter(SWIGWARN_RUBY_WRONG_NAME) doubleArray; /* Ruby, wrong class name */
4
5 %include <carrays.i>
6
7 %array_functions(int,intArray);
8 %array_class(double, doubleArray);
9
10 %inline %{
11 typedef struct {
12   int x;
13   int y;
14 } XY;
15 XY globalXYArray[3];
16
17 typedef struct {
18   int a;
19   int b;
20 } AB;
21
22 AB globalABArray[3];
23 %}
24
25 // Note that struct XY { ... }; gives compiler error for C when using %array_class or %array_functions, but is okay in C++
26 %array_class(XY, XYArray)
27 %array_functions(AB, ABArray)
28