PageRenderTime 4ms CodeModel.GetById 1ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/trunk/Examples/java/variables/example.i

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