PageRenderTime 31ms CodeModel.GetById 25ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/trunk/Examples/test-suite/li_carrays.i

#
Swig | 28 lines | 20 code | 8 blank | 0 comment | 0 complexity | f8f324d24f1d929c6d0e94ebded1e22f MD5 | raw file
 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 %{
11typedef struct {
12  int x;
13  int y;
14} XY;
15XY globalXYArray[3];
16
17typedef struct {
18  int a;
19  int b;
20} AB;
21
22AB 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