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

/trunk/Examples/perl5/variables/example.i

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