PageRenderTime 19ms CodeModel.GetById 14ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/trunk/Examples/ruby/variables/example.i

#
Swig | 50 lines | 37 code | 9 blank | 4 comment | 0 complexity | 7af29cc828922e247550f82e6493958e MD5 | raw file
 1/* File : example.i */
 2%module example
 3%{
 4#include "example.h"
 5%}
 6#pragma SWIG nowarn=SWIGWARN_TYPEMAP_SWIGTYPELEAK
 7
 8/* Some global variable declarations */
 9%inline %{
10extern int              ivar;
11extern short            svar;
12extern long             lvar;
13extern unsigned int     uivar;
14extern unsigned short   usvar;
15extern unsigned long    ulvar;
16extern signed char      scvar;
17extern unsigned char    ucvar;
18extern char             cvar;
19extern float            fvar;
20extern double           dvar;
21extern char            *strvar;
22extern const char       cstrvar[];
23extern int             *iptrvar;
24extern char             name[256];
25
26extern Point           *ptptr;
27extern Point            pt;
28%}
29
30
31/* Some read-only variables */
32
33%immutable;
34
35%inline %{
36extern int  status;
37extern char path[256];
38%}
39
40%mutable;
41
42/* Some helper functions to make it easier to test */
43%inline %{
44extern void  print_vars();
45extern int  *new_int(int value);
46extern Point *new_Point(int x, int y);
47extern char  *Point_print(Point *p);
48extern void  pt_print();
49%}
50