import source from 1.3.40
[external/swig.git] / Examples / test-suite / long_long.i
1 /* This interface file tests whether SWIG handles the new ISO C
2    long long types.
3 */
4
5 %module long_long
6
7 %warnfilter(SWIGWARN_RUBY_WRONG_NAME) lconst1; /* Ruby, wrong constant name */
8 %warnfilter(SWIGWARN_RUBY_WRONG_NAME) lconst2; /* Ruby, wrong constant name */
9 %warnfilter(SWIGWARN_RUBY_WRONG_NAME) lconst3; /* Ruby, wrong constant name */
10 %warnfilter(SWIGWARN_RUBY_WRONG_NAME) lconst4; /* Ruby, wrong constant name */
11 %warnfilter(SWIGWARN_RUBY_WRONG_NAME) lconst5; /* Ruby, wrong constant name */
12 %warnfilter(SWIGWARN_RUBY_WRONG_NAME) lconst6; /* Ruby, wrong constant name */
13
14 %inline %{
15 void foo1(long long x) {}
16 void foo2(long long int x) {}
17 void foo3(signed long long int x) {}
18 void foo4(unsigned long long int x) {}
19 void foo5(signed long long x) {}
20 void foo6(unsigned long long x) {}
21
22 long long bar1() {return 0;}
23 long long int bar2() {return 0;}
24 signed long long int bar3() {return 0;}
25 unsigned long long int bar4() {return 0;}
26 signed long long bar5() {return 0;}
27 unsigned long long bar6() {return 0;}
28
29 long long ll;
30 unsigned long long ull;
31 %}
32
33 %constant long long  lconst1 = 1234567890LL;
34 %constant unsigned long long lconst2 = 1234567890ULL;
35
36 %constant lconst3 = 1234567LL;
37 %constant lconst4 = 1234567ULL;
38
39 #define lconst5 987654321LL
40 #define lconst6 987654321ULL