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
|
|
@ -28,7 +28,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
%typemap(in, fragment="SWIG_SciDouble_AsDoubleArrayAndSize") std::vector<double>&(std::vector<double> temp)
|
||||
%typemap(in, fragment="SWIG_SciDouble_AsDoubleArrayAndSize") std::vector<double>& (std::vector<double> temp)
|
||||
{
|
||||
double* dmatrix;
|
||||
int nbRows;
|
||||
|
|
@ -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();
|
||||
double* dmatrix = new double[nbCols];
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
%typemap(in, fragment="SWIG_SciInt32_AsIntArrayAndSize") std::vector<int>&(std::vector<int> temp)
|
||||
%typemap(in, fragment="SWIG_SciInt32_AsIntArrayAndSize") std::vector<int>& (std::vector<int> temp)
|
||||
{
|
||||
int* imatrix;
|
||||
int nbRows;
|
||||
|
|
@ -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* imatrix = new int[nbCols];
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
%include <scichar.swg>
|
||||
|
||||
%typemap(in, fragment="SwigScilabStringToCharPtrArrayAndSize") std::vector<std::string>(std::vector<std::string> temp)
|
||||
%typemap(in, fragment="SwigScilabStringToCharPtrArrayAndSize") std::vector<std::string> (std::vector<std::string> temp)
|
||||
{
|
||||
char** charArray;
|
||||
int charArraySize;
|
||||
|
|
@ -27,7 +27,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
%typemap(in, fragment="SwigScilabStringToCharPtrArrayAndSize") std::vector<std::string>&(std::vector<std::string> temp)
|
||||
%typemap(in, fragment="SwigScilabStringToCharPtrArrayAndSize") std::vector<std::string>& (std::vector<std::string> temp)
|
||||
{
|
||||
char** charArray;
|
||||
int charArraySize;
|
||||
|
|
@ -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();
|
||||
char** pCharArray = new char*[pCharArraySize];
|
||||
|
|
@ -104,3 +104,6 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue