The great merge
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4141 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
6fcc22a1f8
commit
516036631c
1508 changed files with 125983 additions and 44037 deletions
26
SWIG/Examples/test-suite/primitive_ref.i
Normal file
26
SWIG/Examples/test-suite/primitive_ref.i
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
// Tests passing of references to primitive datatypes
|
||||
%module primitive_ref
|
||||
|
||||
%define ref(type,name)
|
||||
%inline %{
|
||||
const type &ref_##name(const type &x) {
|
||||
static type y = x;
|
||||
return y;
|
||||
}
|
||||
%}
|
||||
%enddef
|
||||
|
||||
ref(int,int);
|
||||
ref(unsigned int, uint);
|
||||
ref(short, short);
|
||||
ref(unsigned short, ushort);
|
||||
ref(long,long);
|
||||
ref(unsigned long, ulong);
|
||||
ref(signed char, schar);
|
||||
ref(unsigned char, uchar);
|
||||
ref(char, char);
|
||||
ref(float, float);
|
||||
ref(double, double);
|
||||
ref(bool, bool);
|
||||
ref(long long, longlong);
|
||||
ref(unsigned long long, ulonglong);
|
||||
Loading…
Add table
Add a link
Reference in a new issue