Fix in Perl out-typemap for std::vector (thanks to Josh Cherry)
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5980 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
c394a8dd9f
commit
2ee999ed53
1 changed files with 2 additions and 1 deletions
|
|
@ -139,8 +139,9 @@ namespace std {
|
|||
int len = $1.size();
|
||||
SV **svs = new SV*[len];
|
||||
for (unsigned int i=0; i<len; i++) {
|
||||
T* ptr = new T($1[i]);
|
||||
svs[i] = sv_newmortal();
|
||||
SWIG_MakePtr(svs[i], (void*)&($1[i]),
|
||||
SWIG_MakePtr(svs[i], (void*) ptr,
|
||||
$descriptor(T *), $shadow|$owner);
|
||||
}
|
||||
AV *myav = av_make(len, svs);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue