Scilab: reference passing default mode is INPUT (here fix for vectors)
This commit is contained in:
parent
9bdeb67312
commit
87e0005276
3 changed files with 10 additions and 7 deletions
|
|
@ -70,7 +70,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
%typemap(argout, fragment="SWIG_SciDouble_FromDoubleArrayAndSize") std::vector<double>&
|
%typemap(argout, fragment="SWIG_SciDouble_FromDoubleArrayAndSize") std::vector<double> &INOUT
|
||||||
{
|
{
|
||||||
int nbCols = $1->size();
|
int nbCols = $1->size();
|
||||||
double* dmatrix = new double[nbCols];
|
double* dmatrix = new double[nbCols];
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
%typemap(argout, fragment="SWIG_SciInt32_FromIntArrayAndSize") std::vector<int>&
|
%typemap(argout, fragment="SWIG_SciInt32_FromIntArrayAndSize") std::vector<int> &INOUT
|
||||||
{
|
{
|
||||||
int nbCols = $1->size();
|
int nbCols = $1->size();
|
||||||
int* imatrix = new int[nbCols];
|
int* imatrix = new int[nbCols];
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
%typemap(argout, fragment="SwigScilabStringFromCharPtrArray") std::vector<std::string>&
|
%typemap(argout, fragment="SwigScilabStringFromCharPtrArray") std::vector<std::string> &INOUT
|
||||||
{
|
{
|
||||||
int pCharArraySize = $1->size();
|
int pCharArraySize = $1->size();
|
||||||
char** pCharArray = new char*[pCharArraySize];
|
char** pCharArray = new char*[pCharArraySize];
|
||||||
|
|
@ -104,3 +104,6 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue