Abstract directors and typemap fixes.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5024 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
94c6b3ba6e
commit
c1b57370b6
10 changed files with 97 additions and 17 deletions
|
|
@ -203,9 +203,9 @@ namespace std {
|
|||
}
|
||||
}
|
||||
%typemap(inv) vector<T> {
|
||||
$input = PyTuple_New($1.size());
|
||||
for (unsigned int i=0; i<$1.size(); i++) {
|
||||
T* ptr = new T((($1_type &)$1)[i]);
|
||||
$input = PyTuple_New($1_name.size());
|
||||
for (unsigned int i=0; i<$1_name.size(); i++) {
|
||||
T* ptr = new T((($1_type &)$1_name)[i]);
|
||||
PyTuple_SetItem($input,i,
|
||||
SWIG_NewPointerObj((void *) ptr,
|
||||
$descriptor(T *), 1));
|
||||
|
|
@ -486,7 +486,7 @@ namespace std {
|
|||
%typemap(inv) vector<T> {
|
||||
$input = PyTuple_New($1_name.size());
|
||||
for (unsigned int i=0; i<$1_name.size(); i++) {
|
||||
T ptr = (($1_type &)$1)[i];
|
||||
T ptr = (($1_type &)$1_name)[i];
|
||||
PyTuple_SetItem($input,i,
|
||||
SWIG_NewPointerObj((void *) ptr,
|
||||
$descriptor(T), 0));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue