scilab: minor fixes in matrix typemaps
This commit is contained in:
parent
22dad86b40
commit
a84c78e411
3 changed files with 22 additions and 22 deletions
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
%typemap(in, fragment="SWIG_SciString_AsCharPtrArrayAndSize") (char** vectorIn, int vectorInSize)
|
||||
{
|
||||
if (SWIG_SciString_AsCharPtrArrayAndSize(pvApiCtx, $input, &$1, &$2, fname) == SWIG_ERROR)
|
||||
if (SWIG_SciString_AsCharPtrArrayAndSize(pvApiCtx, $input, &$1, &$2, fname) != SWIG_OK)
|
||||
{
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
|
|
@ -37,7 +37,7 @@
|
|||
|
||||
%typemap(argout, fragment="SWIG_SciString_FromCharPtrArray") (char*** vectorOut, int* vectorOutSize)
|
||||
{
|
||||
if (SWIG_SciString_FromCharPtrArray(pvApiCtx, SWIG_Scilab_GetOutputPosition(), *$1, *$2) != SWIG_ERROR)
|
||||
if (SWIG_SciString_FromCharPtrArray(pvApiCtx, SWIG_Scilab_GetOutputPosition(), *$1, *$2) == SWIG_OK)
|
||||
{
|
||||
SWIG_Scilab_SetOutput(pvApiCtx, SWIG_NbInputArgument(pvApiCtx) + SWIG_Scilab_GetOutputPosition());
|
||||
}
|
||||
|
|
@ -51,7 +51,7 @@
|
|||
|
||||
%typemap(in, fragment="SWIG_SciString_AsCharPtrArrayAndSize") (int vectorInSize, char** vectorIn)
|
||||
{
|
||||
if (SWIG_SciString_AsCharPtrArrayAndSize(pvApiCtx, $input, &$2, &$1, fname) == SWIG_ERROR)
|
||||
if (SWIG_SciString_AsCharPtrArrayAndSize(pvApiCtx, $input, &$2, &$1, fname) != SWIG_OK)
|
||||
{
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
|
|
@ -71,7 +71,7 @@
|
|||
|
||||
%typemap(argout, fragment="SWIG_SciString_FromCharPtrArray") (int* vectorOutSize, char*** vectorOut)
|
||||
{
|
||||
if (SWIG_SciString_FromCharPtrArray(pvApiCtx, SWIG_Scilab_GetOutputPosition(), *$2, *$1) != SWIG_ERROR)
|
||||
if (SWIG_SciString_FromCharPtrArray(pvApiCtx, SWIG_Scilab_GetOutputPosition(), *$2, *$1) == SWIG_OK)
|
||||
{
|
||||
SWIG_Scilab_SetOutput(pvApiCtx, SWIG_NbInputArgument(pvApiCtx) + SWIG_Scilab_GetOutputPosition());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
%typemap(in, fragment="SWIG_SciDouble_AsDoubleArrayAndSize") (double* matrixIn, int matrixInRowCount, int matrixInColCount)
|
||||
{
|
||||
if (SWIG_SciDouble_AsDoubleArrayAndSize(pvApiCtx, $input, &$2, &$3, &$1, fname) == SWIG_ERROR)
|
||||
if (SWIG_SciDouble_AsDoubleArrayAndSize(pvApiCtx, $input, &$2, &$3, &$1, fname) != SWIG_OK)
|
||||
{
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
%typemap(in, fragment="SWIG_SciDouble_AsDoubleArrayAndSize") (int matrixInRowCount, int matrixInColCount, double* matrixIn)
|
||||
{
|
||||
if (SWIG_SciDouble_AsDoubleArrayAndSize(pvApiCtx, $input, &$1, &$2, &$3, fname) == SWIG_ERROR)
|
||||
if (SWIG_SciDouble_AsDoubleArrayAndSize(pvApiCtx, $input, &$1, &$2, &$3, fname) != SWIG_OK)
|
||||
{
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
|
|
@ -27,11 +27,11 @@
|
|||
|
||||
// in (double* vectorIn, int vectorInSize)
|
||||
|
||||
%typemap(in) (double* vectorIn, int vectorInSize)
|
||||
%typemap(in, fragment="SWIG_SciDouble_AsDoubleArrayAndSize") (double* vectorIn, int vectorInSize)
|
||||
{
|
||||
int rowCount;
|
||||
int colCount;
|
||||
if (SWIG_SciDouble_AsDoubleArrayAndSize(pvApiCtx, $input, &rowCount, &colCount, &$1, fname) != SWIG_ERROR)
|
||||
if (SWIG_SciDouble_AsDoubleArrayAndSize(pvApiCtx, $input, &rowCount, &colCount, &$1, fname) == SWIG_OK)
|
||||
{
|
||||
$2 = rowCount * colCount;
|
||||
}
|
||||
|
|
@ -43,11 +43,11 @@
|
|||
|
||||
// in (int vectorInSize, double* vectorIn)
|
||||
|
||||
%typemap(in) (int vectorInSize, double* vectorIn)
|
||||
%typemap(in, fragment="SWIG_SciDouble_AsDoubleArrayAndSize") (int vectorInSize, double* vectorIn)
|
||||
{
|
||||
int rowCount;
|
||||
int colCount;
|
||||
if (SWIG_SciDouble_AsDoubleArrayAndSize(pvApiCtx, $input, &rowCount, &colCount, &$2, fname) != SWIG_ERROR)
|
||||
if (SWIG_SciDouble_AsDoubleArrayAndSize(pvApiCtx, $input, &rowCount, &colCount, &$2, fname) == SWIG_OK)
|
||||
{
|
||||
$1 = rowCount * colCount;
|
||||
}
|
||||
|
|
@ -80,7 +80,7 @@
|
|||
|
||||
%typemap(argout, fragment="SWIG_SciDouble_FromDoubleArrayAndSize") (double** matrixOut, int* matrixOutRowCount, int* matrixOutColCount)
|
||||
{
|
||||
if (SWIG_SciDouble_FromDoubleArrayAndSize(pvApiCtx, SWIG_Scilab_GetOutputPosition(), *$2, *$3, *$1) != SWIG_ERROR)
|
||||
if (SWIG_SciDouble_FromDoubleArrayAndSize(pvApiCtx, SWIG_Scilab_GetOutputPosition(), *$2, *$3, *$1) == SWIG_OK)
|
||||
{
|
||||
SWIG_Scilab_SetOutput(pvApiCtx, SWIG_NbInputArgument(pvApiCtx) + SWIG_Scilab_GetOutputPosition());
|
||||
}
|
||||
|
|
@ -105,7 +105,7 @@
|
|||
|
||||
%typemap(argout, fragment="SWIG_SciDouble_FromDoubleArrayAndSize") (int* matrixInRowCount, int* matrixInColCount, double** matrixOut)
|
||||
{
|
||||
if (SWIG_SciDouble_FromDoubleArrayAndSize(pvApiCtx, SWIG_Scilab_GetOutputPosition(), *$1, *$2, *$3) != SWIG_ERROR)
|
||||
if (SWIG_SciDouble_FromDoubleArrayAndSize(pvApiCtx, SWIG_Scilab_GetOutputPosition(), *$1, *$2, *$3) == SWIG_OK)
|
||||
{
|
||||
SWIG_Scilab_SetOutput(pvApiCtx, SWIG_NbInputArgument(pvApiCtx) + SWIG_Scilab_GetOutputPosition());
|
||||
}
|
||||
|
|
@ -138,7 +138,7 @@
|
|||
|
||||
%typemap(argout, fragment="SWIG_SciDouble_FromDoubleArrayAndSize") (double** vectorOut, int* vectorOutSize)
|
||||
{
|
||||
if (SWIG_SciDouble_FromDoubleArrayAndSize(pvApiCtx, SWIG_Scilab_GetOutputPosition(), 1, *$2, *$1) != SWIG_ERROR)
|
||||
if (SWIG_SciDouble_FromDoubleArrayAndSize(pvApiCtx, SWIG_Scilab_GetOutputPosition(), 1, *$2, *$1) == SWIG_OK)
|
||||
{
|
||||
SWIG_Scilab_SetOutput(pvApiCtx, SWIG_NbInputArgument(pvApiCtx) + SWIG_Scilab_GetOutputPosition());
|
||||
}
|
||||
|
|
@ -170,7 +170,7 @@
|
|||
|
||||
%typemap(argout, fragment="SWIG_SciDouble_FromDoubleArrayAndSize") (int* vectorOutSize, double** vectorOut)
|
||||
{
|
||||
if (SWIG_SciDouble_FromDoubleArrayAndSize(pvApiCtx, SWIG_Scilab_GetOutputPosition(), 1, *$1, *$2) != SWIG_ERROR)
|
||||
if (SWIG_SciDouble_FromDoubleArrayAndSize(pvApiCtx, SWIG_Scilab_GetOutputPosition(), 1, *$1, *$2) == SWIG_OK)
|
||||
{
|
||||
SWIG_Scilab_SetOutput(pvApiCtx, SWIG_NbInputArgument(pvApiCtx) + SWIG_Scilab_GetOutputPosition());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
%typemap(in, fragment="SWIG_SciDoubleOrInt32_AsIntArrayAndSize") (int* matrixIn, int matrixInRowCount, int matrixInColCount)
|
||||
{
|
||||
if (SWIG_SciDoubleOrInt32_AsIntArrayAndSize(pvApiCtx, $input, &$2, &$3, &$1, fname) == SWIG_ERROR)
|
||||
if (SWIG_SciDoubleOrInt32_AsIntArrayAndSize(pvApiCtx, $input, &$2, &$3, &$1, fname) != SWIG_OK)
|
||||
{
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
%typemap(in, fragment="SWIG_SciDoubleOrInt32_AsIntArrayAndSize") (int matrixInRowCount, int matrixInColCount, int* matrixIn)
|
||||
{
|
||||
if (SWIG_SciDoubleOrInt32_AsIntArrayAndSize(pvApiCtx, $input, &$1, &$2, &$3, fname) == SWIG_ERROR)
|
||||
if (SWIG_SciDoubleOrInt32_AsIntArrayAndSize(pvApiCtx, $input, &$1, &$2, &$3, fname) != SWIG_OK)
|
||||
{
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
|
|
@ -33,7 +33,7 @@
|
|||
{
|
||||
int rowCount;
|
||||
int colCount;
|
||||
if (SWIG_SciDoubleOrInt32_AsIntArrayAndSize(pvApiCtx, $input, &rowCount, &colCount, &$1, fname) != SWIG_ERROR)
|
||||
if (SWIG_SciDoubleOrInt32_AsIntArrayAndSize(pvApiCtx, $input, &rowCount, &colCount, &$1, fname) == SWIG_OK)
|
||||
{
|
||||
$2 = rowCount * colCount;
|
||||
}
|
||||
|
|
@ -50,7 +50,7 @@
|
|||
{
|
||||
int rowCount;
|
||||
int colCount;
|
||||
if (SWIG_SciDoubleOrInt32_AsIntArrayAndSize(pvApiCtx, $input, &rowCount, &colCount, &$2, fname) != SWIG_ERROR)
|
||||
if (SWIG_SciDoubleOrInt32_AsIntArrayAndSize(pvApiCtx, $input, &rowCount, &colCount, &$2, fname) == SWIG_OK)
|
||||
{
|
||||
$1 = rowCount * colCount;
|
||||
}
|
||||
|
|
@ -75,7 +75,7 @@
|
|||
|
||||
%typemap(argout, fragment="SWIG_SciDouble_FromIntArrayAndSize") (int** matrixOut, int* matrixOutRowCount, int* matrixOutColCount)
|
||||
{
|
||||
if (SWIG_SciDouble_FromIntArrayAndSize(pvApiCtx, SWIG_Scilab_GetOutputPosition(), *$2, *$3, *$1) != SWIG_ERROR)
|
||||
if (SWIG_SciDouble_FromIntArrayAndSize(pvApiCtx, SWIG_Scilab_GetOutputPosition(), *$2, *$3, *$1) == SWIG_OK)
|
||||
{
|
||||
SWIG_Scilab_SetOutput(pvApiCtx, SWIG_NbInputArgument(pvApiCtx) + SWIG_Scilab_GetOutputPosition());
|
||||
}
|
||||
|
|
@ -109,7 +109,7 @@
|
|||
|
||||
%typemap(argout, fragment="SWIG_SciDouble_FromIntArrayAndSize") (int* matrixOutRowCount, int* matrixOutColCount, int** matrixOut)
|
||||
{
|
||||
if (SWIG_SciDouble_FromIntArrayAndSize(pvApiCtx, SWIG_Scilab_GetOutputPosition(), *$1, *$2, *$3) != SWIG_ERROR)
|
||||
if (SWIG_SciDouble_FromIntArrayAndSize(pvApiCtx, SWIG_Scilab_GetOutputPosition(), *$1, *$2, *$3) == SWIG_OK)
|
||||
{
|
||||
SWIG_Scilab_SetOutput(pvApiCtx, SWIG_NbInputArgument(pvApiCtx) + SWIG_Scilab_GetOutputPosition());
|
||||
}
|
||||
|
|
@ -142,7 +142,7 @@
|
|||
|
||||
%typemap(argout, fragment="SWIG_SciDouble_FromIntArrayAndSize") (int** vectorOut, int* vectorOutSize)
|
||||
{
|
||||
if (SWIG_SciDouble_FromIntArrayAndSize(pvApiCtx, SWIG_Scilab_GetOutputPosition(), 1, *$2, *$1) != SWIG_ERROR)
|
||||
if (SWIG_SciDouble_FromIntArrayAndSize(pvApiCtx, SWIG_Scilab_GetOutputPosition(), 1, *$2, *$1) == SWIG_OK)
|
||||
{
|
||||
SWIG_Scilab_SetOutput(pvApiCtx, SWIG_NbInputArgument(pvApiCtx) + SWIG_Scilab_GetOutputPosition());
|
||||
}
|
||||
|
|
@ -174,7 +174,7 @@
|
|||
|
||||
%typemap(argout, fragment="SWIG_SciDouble_FromIntArrayAndSize") (int* vectorOutSize, int** vectorOut)
|
||||
{
|
||||
if (SWIG_SciDouble_FromIntArrayAndSize(pvApiCtx, SWIG_Scilab_GetOutputPosition(), 1, *$1, *$2) != SWIG_ERROR)
|
||||
if (SWIG_SciDouble_FromIntArrayAndSize(pvApiCtx, SWIG_Scilab_GetOutputPosition(), 1, *$1, *$2) == SWIG_OK)
|
||||
{
|
||||
SWIG_Scilab_SetOutput(pvApiCtx, SWIG_NbInputArgument(pvApiCtx) + SWIG_Scilab_GetOutputPosition());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue