scilab: rename "vector" to "matrix" in matrix typemaps

This commit is contained in:
Simon Marchetto 2014-03-14 11:58:05 +01:00
commit cdf1144d35
4 changed files with 56 additions and 56 deletions

View file

@ -25,9 +25,9 @@
} }
} }
// in (bool *vectorIn, int vectorInSize) // in (bool *matrixIn, int matrixInSize)
%typemap(in, noblock=1, fragment="SWIG_SciBoolean_AsBoolArrayAndSize") (bool *vectorIn, int vectorInSize) %typemap(in, noblock=1, fragment="SWIG_SciBoolean_AsBoolArrayAndSize") (bool *matrixIn, int matrixInSize)
{ {
int rowCount; int rowCount;
int colCount; int colCount;
@ -41,9 +41,9 @@
} }
} }
// in (int vectorInSize, bool *vectorIn) // in (int matrixInSize, bool *matrixIn)
%typemap(in, noblock=1) (int vectorInSize, bool *vectorIn) %typemap(in, noblock=1) (int matrixInSize, bool *matrixIn)
{ {
int rowCount; int rowCount;
int colCount; int colCount;
@ -124,19 +124,19 @@
} }
// out (bool **vectorOut, int *vectorOutSize) // out (bool **matrixOut, int *matrixOutSize)
%typemap(in, noblock=1, numinputs=0) (bool **vectorOut, int *vectorOutSize) %typemap(in, noblock=1, numinputs=0) (bool **matrixOut, int *matrixOutSize)
{ {
} }
%typemap(arginit, noblock=1) (bool **vectorOut, int *vectorOutSize) %typemap(arginit, noblock=1) (bool **matrixOut, int *matrixOutSize)
{ {
$1 = (bool**) malloc(sizeof(bool*)); $1 = (bool**) malloc(sizeof(bool*));
$2 = (int*) malloc(sizeof(int)); $2 = (int*) malloc(sizeof(int));
} }
%typemap(argout, noblock=1, fragment="SWIG_SciBoolean_FromBoolArrayAndSize") (bool **vectorOut, int *vectorOutSize) %typemap(argout, noblock=1, fragment="SWIG_SciBoolean_FromBoolArrayAndSize") (bool **matrixOut, int *matrixOutSize)
{ {
if (SWIG_SciBoolean_FromBoolArrayAndSize(pvApiCtx, SWIG_Scilab_GetOutputPosition(), 1, *$2, *$1) == SWIG_OK) if (SWIG_SciBoolean_FromBoolArrayAndSize(pvApiCtx, SWIG_Scilab_GetOutputPosition(), 1, *$2, *$1) == SWIG_OK)
{ {
@ -148,7 +148,7 @@
} }
} }
%typemap(freearg, noblock=1) (bool **vectorOut, int *vectorOutSize) %typemap(freearg, noblock=1) (bool **matrixOut, int *matrixOutSize)
{ {
free(*$1); free(*$1);
free($1); free($1);
@ -156,19 +156,19 @@
} }
// out (int *vectorOutSize, bool **vectorOut) // out (int *matrixOutSize, bool **matrixOut)
%typemap(in, noblock=1, numinputs=0) (int *vectorOutSize, bool **vectorOut) %typemap(in, noblock=1, numinputs=0) (int *matrixOutSize, bool **matrixOut)
{ {
} }
%typemap(arginit, noblock=1) (int *vectorOutSize, bool **vectorOut) %typemap(arginit, noblock=1) (int *matrixOutSize, bool **matrixOut)
{ {
$1 = (int*) malloc(sizeof(int)); $1 = (int*) malloc(sizeof(int));
$2 = (bool**) malloc(sizeof(bool*)); $2 = (bool**) malloc(sizeof(bool*));
} }
%typemap(argout, noblock=1, fragment="SWIG_SciBoolean_FromBoolArrayAndSize") (int *vectorOutSize, bool **vectorOut) %typemap(argout, noblock=1, fragment="SWIG_SciBoolean_FromBoolArrayAndSize") (int *matrixOutSize, bool **matrixOut)
{ {
if (SWIG_SciBoolean_FromBoolArrayAndSize(pvApiCtx, SWIG_Scilab_GetOutputPosition(), 1, *$1, *$2) == SWIG_OK) if (SWIG_SciBoolean_FromBoolArrayAndSize(pvApiCtx, SWIG_Scilab_GetOutputPosition(), 1, *$1, *$2) == SWIG_OK)
{ {
@ -180,7 +180,7 @@
} }
} }
%typemap(freearg, noblock=1) (int *vectorOutSize, bool **vectorOut) %typemap(freearg, noblock=1) (int *matrixOutSize, bool **matrixOut)
{ {
free($1); free($1);
free(*$2); free(*$2);

View file

@ -25,9 +25,9 @@
} }
} }
// in (char **vectorIn, int vectorInSize) // in (char **matrixIn, int matrixInSize)
%typemap(in, noblock=1, fragment="SWIG_SciString_AsCharPtrArrayAndSize") (char **vectorIn, int vectorInSize) %typemap(in, noblock=1, fragment="SWIG_SciString_AsCharPtrArrayAndSize") (char **matrixIn, int matrixInSize)
{ {
if (SWIG_SciString_AsCharPtrArrayAndSize(pvApiCtx, $input, 1, &$2, &$1, fname) != SWIG_OK) if (SWIG_SciString_AsCharPtrArrayAndSize(pvApiCtx, $input, 1, &$2, &$1, fname) != SWIG_OK)
{ {
@ -102,19 +102,19 @@
} }
// out (char ***vectorOut, int *vectorOutSize) // out (char ***matrixOut, int *matrixOutSize)
%typemap(in, noblock=1, numinputs=0) (char ***vectorOut, int *vectorOutSize) %typemap(in, noblock=1, numinputs=0) (char ***matrixOut, int *matrixOutSize)
{ {
} }
%typemap(arginit, noblock=1) (char ***vectorOut, int *vectorOutSize) %typemap(arginit, noblock=1) (char ***matrixOut, int *matrixOutSize)
{ {
$1 = (char***) malloc(sizeof(char**)); $1 = (char***) malloc(sizeof(char**));
$2 = (int*) malloc(sizeof(int)); $2 = (int*) malloc(sizeof(int));
} }
%typemap(freearg, noblock=1) (char ***vectorOut, int *vectorOutSize) %typemap(freearg, noblock=1) (char ***matrixOut, int *matrixOutSize)
{ {
free(*(*$1)); free(*(*$1));
free(*$1); free(*$1);
@ -122,7 +122,7 @@
free($2); free($2);
} }
%typemap(argout, noblock=1, fragment="SWIG_SciString_FromCharPtrArrayAndSize") (char ***vectorOut, int *vectorOutSize) %typemap(argout, noblock=1, fragment="SWIG_SciString_FromCharPtrArrayAndSize") (char ***matrixOut, int *matrixOutSize)
{ {
if (SWIG_SciString_FromCharPtrArray(pvApiCtx, SWIG_Scilab_GetOutputPosition(), 1, *$2, *$1) == SWIG_OK) if (SWIG_SciString_FromCharPtrArray(pvApiCtx, SWIG_Scilab_GetOutputPosition(), 1, *$2, *$1) == SWIG_OK)
{ {
@ -134,9 +134,9 @@
} }
} }
// in (int vectorInSize, char **vectorIn) // in (int matrixInSize, char **matrixIn)
%typemap(in, noblock=1, fragment="SWIG_SciString_AsCharPtrArrayAndSize") (int vectorInSize, char **vectorIn) %typemap(in, noblock=1, fragment="SWIG_SciString_AsCharPtrArrayAndSize") (int matrixInSize, char **matrixIn)
{ {
if (SWIG_SciString_AsCharPtrArrayAndSize(pvApiCtx, $input, 1, &$1, &$2, fname) != SWIG_OK) if (SWIG_SciString_AsCharPtrArrayAndSize(pvApiCtx, $input, 1, &$1, &$2, fname) != SWIG_OK)
{ {
@ -144,19 +144,19 @@
} }
} }
// out (int *vectorOutSize, char ***vectorOut) // out (int *matrixOutSize, char ***matrixOut)
%typemap(in, noblock=1, numinputs=0) (int *vectorOutSize, char ***vectorOut) %typemap(in, noblock=1, numinputs=0) (int *matrixOutSize, char ***matrixOut)
{ {
} }
%typemap(arginit, noblock=1) (int *vectorOutSize, char ***vectorOut) %typemap(arginit, noblock=1) (int *matrixOutSize, char ***matrixOut)
{ {
$1 = (int*) malloc(sizeof(int)); $1 = (int*) malloc(sizeof(int));
$2 = (char***) malloc(sizeof(char**)); $2 = (char***) malloc(sizeof(char**));
} }
%typemap(argout, noblock=1, fragment="SWIG_SciString_FromCharPtrArrayAndSize") (int *vectorOutSize, char ***vectorOut) %typemap(argout, noblock=1, fragment="SWIG_SciString_FromCharPtrArrayAndSize") (int *matrixOutSize, char ***matrixOut)
{ {
if (SWIG_SciString_FromCharPtrArray(pvApiCtx, SWIG_Scilab_GetOutputPosition(), 1, *$1, *$2) == SWIG_OK) if (SWIG_SciString_FromCharPtrArray(pvApiCtx, SWIG_Scilab_GetOutputPosition(), 1, *$1, *$2) == SWIG_OK)
{ {
@ -168,7 +168,7 @@
} }
} }
%typemap(freearg, noblock=1) (int *vectorOutSize, char ***vectorOut) %typemap(freearg, noblock=1) (int *matrixOutSize, char ***matrixOut)
{ {
free($1); free($1);
free(*(*$2)); free(*(*$2));

View file

@ -25,9 +25,9 @@
} }
} }
// in (double *vectorIn, int vectorInSize) // in (double *matrixIn, int matrixInSize)
%typemap(in, noblock=1, fragment="SWIG_SciDouble_AsDoubleArrayAndSize") (double *vectorIn, int vectorInSize) %typemap(in, noblock=1, fragment="SWIG_SciDouble_AsDoubleArrayAndSize") (double *matrixIn, int matrixInSize)
{ {
int rowCount; int rowCount;
int colCount; int colCount;
@ -41,9 +41,9 @@
} }
} }
// in (int vectorInSize, double *vectorIn) // in (int matrixInSize, double *matrixIn)
%typemap(in, noblock=1, fragment="SWIG_SciDouble_AsDoubleArrayAndSize") (int vectorInSize, double *vectorIn) %typemap(in, noblock=1, fragment="SWIG_SciDouble_AsDoubleArrayAndSize") (int matrixInSize, double *matrixIn)
{ {
int rowCount; int rowCount;
int colCount; int colCount;
@ -124,19 +124,19 @@
} }
// out (double **vectorOut, int *vectorOutSize) // out (double **matrixOut, int *matrixOutSize)
%typemap(in, noblock=1, numinputs=0) (double **vectorOut, int *vectorOutSize) %typemap(in, noblock=1, numinputs=0) (double **matrixOut, int *matrixOutSize)
{ {
} }
%typemap(arginit, noblock=1) (double **vectorOut, int *vectorOutSize) %typemap(arginit, noblock=1) (double **matrixOut, int *matrixOutSize)
{ {
$1 = (double**) malloc(sizeof(double*)); $1 = (double**) malloc(sizeof(double*));
$2 = (int*) malloc(sizeof(int)); $2 = (int*) malloc(sizeof(int));
} }
%typemap(argout, noblock=1, fragment="SWIG_SciDouble_FromDoubleArrayAndSize") (double **vectorOut, int *vectorOutSize) %typemap(argout, noblock=1, fragment="SWIG_SciDouble_FromDoubleArrayAndSize") (double **matrixOut, int *matrixOutSize)
{ {
if (SWIG_SciDouble_FromDoubleArrayAndSize(pvApiCtx, SWIG_Scilab_GetOutputPosition(), 1, *$2, *$1) == SWIG_OK) if (SWIG_SciDouble_FromDoubleArrayAndSize(pvApiCtx, SWIG_Scilab_GetOutputPosition(), 1, *$2, *$1) == SWIG_OK)
{ {
@ -148,7 +148,7 @@
} }
} }
%typemap(freearg, noblock=1) (double **vectorOut, int *vectorOutSize) %typemap(freearg, noblock=1) (double **matrixOut, int *matrixOutSize)
{ {
free(*$1); free(*$1);
free($1); free($1);
@ -156,19 +156,19 @@
} }
// out (int *vectorOutSize, double **vectorOut) // out (int *matrixOutSize, double **matrixOut)
%typemap(in, noblock=1, numinputs=0) (int *vectorOutSize, double **vectorOut) %typemap(in, noblock=1, numinputs=0) (int *matrixOutSize, double **matrixOut)
{ {
} }
%typemap(arginit, noblock=1) (int *vectorOutSize, double **vectorOut) %typemap(arginit, noblock=1) (int *matrixOutSize, double **matrixOut)
{ {
$1 = (int*) malloc(sizeof(int)); $1 = (int*) malloc(sizeof(int));
$2 = (double**) malloc(sizeof(double*)); $2 = (double**) malloc(sizeof(double*));
} }
%typemap(argout, noblock=1, fragment="SWIG_SciDouble_FromDoubleArrayAndSize") (int *vectorOutSize, double **vectorOut) %typemap(argout, noblock=1, fragment="SWIG_SciDouble_FromDoubleArrayAndSize") (int *matrixOutSize, double **matrixOut)
{ {
if (SWIG_SciDouble_FromDoubleArrayAndSize(pvApiCtx, SWIG_Scilab_GetOutputPosition(), 1, *$1, *$2) == SWIG_OK) if (SWIG_SciDouble_FromDoubleArrayAndSize(pvApiCtx, SWIG_Scilab_GetOutputPosition(), 1, *$1, *$2) == SWIG_OK)
{ {
@ -180,7 +180,7 @@
} }
} }
%typemap(freearg, noblock=1) (int *vectorOutSize, double **vectorOut) %typemap(freearg, noblock=1) (int *matrixOutSize, double **matrixOut)
{ {
free($1); free($1);
free(*$2); free(*$2);

View file

@ -27,9 +27,9 @@
} }
// in (int *vectorIn, int vectorInSize) // in (int *matrixIn, int matrixInSize)
%typemap(in, noblock=1, fragment="SWIG_SciDoubleOrInt32_AsIntArrayAndSize") (int *vectorIn, int vectorInSize) %typemap(in, noblock=1, fragment="SWIG_SciDoubleOrInt32_AsIntArrayAndSize") (int *matrixIn, int matrixInSize)
{ {
int rowCount; int rowCount;
int colCount; int colCount;
@ -44,9 +44,9 @@
} }
// in (int vectorInSize, int *vectorIn) // in (int matrixInSize, int *matrixIn)
%typemap(in, noblock=1, fragment="SWIG_SciDoubleOrInt32_AsIntArrayAndSize") (int vectorInSize, int *vectorIn) %typemap(in, noblock=1, fragment="SWIG_SciDoubleOrInt32_AsIntArrayAndSize") (int matrixInSize, int *matrixIn)
{ {
int rowCount; int rowCount;
int colCount; int colCount;
@ -128,19 +128,19 @@
} }
// out (int **vectorOut, int *vectorOutSize) // out (int **matrixOut, int *matrixOutSize)
%typemap(in, noblock=1, numinputs=0) (int **vectorOut, int *vectorOutSize) %typemap(in, noblock=1, numinputs=0) (int **matrixOut, int *matrixOutSize)
{ {
} }
%typemap(arginit) (int **vectorOut, int *vectorOutSize) %typemap(arginit) (int **matrixOut, int *matrixOutSize)
{ {
$1 = (int**) malloc(sizeof(int*)); $1 = (int**) malloc(sizeof(int*));
$2 = (int*) malloc(sizeof(int)); $2 = (int*) malloc(sizeof(int));
} }
%typemap(argout, noblock=1, fragment="SWIG_SciDouble_FromIntArrayAndSize") (int **vectorOut, int *vectorOutSize) %typemap(argout, noblock=1, fragment="SWIG_SciDouble_FromIntArrayAndSize") (int **matrixOut, int *matrixOutSize)
{ {
if (SWIG_SciDouble_FromIntArrayAndSize(pvApiCtx, SWIG_Scilab_GetOutputPosition(), 1, *$2, *$1) == SWIG_OK) if (SWIG_SciDouble_FromIntArrayAndSize(pvApiCtx, SWIG_Scilab_GetOutputPosition(), 1, *$2, *$1) == SWIG_OK)
{ {
@ -152,7 +152,7 @@
} }
} }
%typemap(freearg, noblock=1) (int **vectorOut, int *vectorOutSize) %typemap(freearg, noblock=1) (int **matrixOut, int *matrixOutSize)
{ {
free(*$1); free(*$1);
free($1); free($1);
@ -160,19 +160,19 @@
} }
// out (int *vectorOutSize, int **vectorOut) // out (int *matrixOutSize, int **matrixOut)
%typemap(in, noblock=1, numinputs=0) (int *vectorOutSize, int **vectorOut) %typemap(in, noblock=1, numinputs=0) (int *matrixOutSize, int **matrixOut)
{ {
} }
%typemap(arginit, noblock=1) (int *vectorOutSize, int **vectorOut) %typemap(arginit, noblock=1) (int *matrixOutSize, int **matrixOut)
{ {
$1 = (int*) malloc(sizeof(int)); $1 = (int*) malloc(sizeof(int));
$2 = (int**) malloc(sizeof(int*)); $2 = (int**) malloc(sizeof(int*));
} }
%typemap(argout, noblock=1, fragment="SWIG_SciDouble_FromIntArrayAndSize") (int *vectorOutSize, int **vectorOut) %typemap(argout, noblock=1, fragment="SWIG_SciDouble_FromIntArrayAndSize") (int *matrixOutSize, int **matrixOut)
{ {
if (SWIG_SciDouble_FromIntArrayAndSize(pvApiCtx, SWIG_Scilab_GetOutputPosition(), 1, *$1, *$2) == SWIG_OK) if (SWIG_SciDouble_FromIntArrayAndSize(pvApiCtx, SWIG_Scilab_GetOutputPosition(), 1, *$1, *$2) == SWIG_OK)
{ {
@ -184,7 +184,7 @@
} }
} }
%typemap(freearg, noblock=1) (int *vectorInSize, int **vectorOut) %typemap(freearg, noblock=1) (int *matrixInSize, int **matrixOut)
{ {
free($1); free($1);
free(*$2); free(*$2);