~ubuntu-branches/ubuntu/maverick/swig1.3/maverick

« back to all changes in this revision

Viewing changes to Examples/test-suite/long_long.i

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Landschoff
  • Date: 2002-03-29 01:56:07 UTC
  • Revision ID: james.westby@ubuntu.com-20020329015607-c0wt03xu8oy9ioj7
Tags: upstream-1.3.11
ImportĀ upstreamĀ versionĀ 1.3.11

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* This interface file tests whether SWIG handles the new ISO C
 
2
   long long types.
 
3
*/
 
4
 
 
5
%module long_long
 
6
 
 
7
%inline %{
 
8
void foo1(long long x) {}
 
9
void foo2(long long int x) {}
 
10
void foo3(signed long long int x) {}
 
11
void foo4(unsigned long long int x) {}
 
12
void foo5(signed long long x) {}
 
13
void foo6(unsigned long long x) {}
 
14
 
 
15
long long bar1() {return 0;}
 
16
long long int bar2() {return 0;}
 
17
signed long long int bar3() {return 0;}
 
18
unsigned long long int bar4() {return 0;}
 
19
signed long long bar5() {return 0;}
 
20
unsigned long long bar6() {return 0;}
 
21
 
 
22
long long ll;
 
23
unsigned long long ull;
 
24
%}
 
25
 
 
26
#ifdef SWIGJAVA
 
27
/* Prevent LL and ULL from appearing in Java code */
 
28
#define LL 
 
29
#define ULL
 
30
/* Can't initialise BigInteger with a number :( */
 
31
%ignore lconst2;
 
32
#endif
 
33
 
 
34
%constant long long  lconst1 = 1234567890LL;
 
35
%constant unsigned long long lconst2 = 1234567890ULL;
 
36
 
 
37
%constant lconst3 = 1234567LL;
 
38
%constant lconst4 = 1234567ULL;
 
39
 
 
40
#define lconst5 987654321LL
 
41
#define lconst6 987654321ULL