added more test cases and broken ones
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6726 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
88a08fdfc8
commit
20debc4ed8
12 changed files with 218 additions and 4 deletions
44
Examples/test-suite/sizet.i
Normal file
44
Examples/test-suite/sizet.i
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
%module sizet
|
||||
%{
|
||||
#include <vector>
|
||||
%}
|
||||
|
||||
%include "std_common.i"
|
||||
%include "std_vector.i"
|
||||
|
||||
%inline
|
||||
{
|
||||
size_t test1(size_t s)
|
||||
{
|
||||
return s;
|
||||
}
|
||||
|
||||
std::size_t test2(std::size_t s)
|
||||
{
|
||||
return s;
|
||||
}
|
||||
|
||||
const std::size_t& test3(const std::size_t& s)
|
||||
{
|
||||
return s;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#ifdef SWIGPYTHON
|
||||
%template(vectors) std::vector<unsigned long>;
|
||||
|
||||
%inline
|
||||
{
|
||||
std::vector<std::size_t> testv1(std::vector<std::size_t> s)
|
||||
{
|
||||
return s;
|
||||
}
|
||||
|
||||
const std::vector<std::size_t>& testv2(const std::vector<std::size_t>& s)
|
||||
{
|
||||
return s;
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue