Compiler warning fix in Perl out typemap for std::vector
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11011 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
9db99bfb3e
commit
0f89bff13a
2 changed files with 8 additions and 2 deletions
|
|
@ -37,3 +37,9 @@ public:
|
|||
#endif
|
||||
|
||||
%template(VectFlow) std::vector<Flow>;
|
||||
|
||||
%inline %{
|
||||
std::vector<Flow> inandout(std::vector<Flow> v) {
|
||||
return v;
|
||||
}
|
||||
%}
|
||||
|
|
|
|||
|
|
@ -105,9 +105,9 @@ namespace std {
|
|||
}
|
||||
}
|
||||
%typemap(out) vector<T> {
|
||||
int len = $1.size();
|
||||
size_t len = $1.size();
|
||||
SV **svs = new SV*[len];
|
||||
for (unsigned int i=0; i<len; i++) {
|
||||
for (size_t i=0; i<len; i++) {
|
||||
T* ptr = new T($1[i]);
|
||||
svs[i] = sv_newmortal();
|
||||
SWIG_MakePtr(svs[i], (void*) ptr,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue