scilab: apply K&R coding style for typemaps
This commit is contained in:
parent
31022667d6
commit
29f45d91ad
18 changed files with 125 additions and 250 deletions
|
|
@ -132,8 +132,7 @@ SWIG_SciString_AsCharPtrAndSize(void *pvApiCtx, int iVar, char **pcValue, size_t
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: return SWIG_ERROR if pcValue NULL (now returning SWIG_ERROR fails some typechecks)
|
// TODO: return SWIG_ERROR if pcValue NULL (now returning SWIG_ERROR fails some typechecks)
|
||||||
if (pcValue)
|
if (pcValue) {
|
||||||
{
|
|
||||||
*pcValue = pstStrings;
|
*pcValue = pstStrings;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -214,8 +213,7 @@ SWIG_SciString_AsCharPtrArrayAndSize(void *pvApiCtx, int iVar, int *iRows, int *
|
||||||
}
|
}
|
||||||
|
|
||||||
*charPtrArray = (char**) malloc((*iRows) * (*iCols) * sizeof(char*));
|
*charPtrArray = (char**) malloc((*iRows) * (*iCols) * sizeof(char*));
|
||||||
for(i = 0 ; i < (*iRows) * (*iCols); i++)
|
for(i = 0 ; i < (*iRows) * (*iCols); i++) {
|
||||||
{
|
|
||||||
(*charPtrArray)[i] = (char*) malloc(sizeof(char) * (piLength[i] + 1));
|
(*charPtrArray)[i] = (char*) malloc(sizeof(char) * (piLength[i] + 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -113,8 +113,7 @@ SWIG_SciDoubleOrInt32_AsIntArrayAndSize(void *pvApiCtx, int iVar, int *iRows, in
|
||||||
int *piAddrVar = NULL;
|
int *piAddrVar = NULL;
|
||||||
|
|
||||||
sciErr = getVarAddressFromPosition(pvApiCtx, iVar, &piAddrVar);
|
sciErr = getVarAddressFromPosition(pvApiCtx, iVar, &piAddrVar);
|
||||||
if (sciErr.iErr)
|
if (sciErr.iErr) {
|
||||||
{
|
|
||||||
printError(&sciErr, 0);
|
printError(&sciErr, 0);
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
|
|
@ -125,15 +124,13 @@ SWIG_SciDoubleOrInt32_AsIntArrayAndSize(void *pvApiCtx, int iVar, int *iRows, in
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (iType == sci_matrix)
|
if (iType == sci_matrix) {
|
||||||
{
|
|
||||||
double *pdData = NULL;
|
double *pdData = NULL;
|
||||||
int size = 0;
|
int size = 0;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
sciErr = getMatrixOfDouble(pvApiCtx, piAddrVar, iRows, iCols, &pdData);
|
sciErr = getMatrixOfDouble(pvApiCtx, piAddrVar, iRows, iCols, &pdData);
|
||||||
if (sciErr.iErr)
|
if (sciErr.iErr) {
|
||||||
{
|
|
||||||
printError(&sciErr, 0);
|
printError(&sciErr, 0);
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
|
|
@ -143,29 +140,24 @@ SWIG_SciDoubleOrInt32_AsIntArrayAndSize(void *pvApiCtx, int iVar, int *iRows, in
|
||||||
for (i = 0; i < size; i++)
|
for (i = 0; i < size; i++)
|
||||||
(*piValue)[i] = (int) pdData[i];
|
(*piValue)[i] = (int) pdData[i];
|
||||||
}
|
}
|
||||||
else if (iType == sci_ints)
|
else if (iType == sci_ints) {
|
||||||
{
|
|
||||||
int iPrec = 0;
|
int iPrec = 0;
|
||||||
sciErr = getMatrixOfIntegerPrecision(pvApiCtx, piAddrVar, &iPrec);
|
sciErr = getMatrixOfIntegerPrecision(pvApiCtx, piAddrVar, &iPrec);
|
||||||
if (sciErr.iErr)
|
if (sciErr.iErr) {
|
||||||
{
|
|
||||||
printError(&sciErr, 0);
|
printError(&sciErr, 0);
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
if (iPrec != SCI_INT32)
|
if (iPrec != SCI_INT32) {
|
||||||
{
|
|
||||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: A 32-bit signed integer or a double matrix expected.\n"), fname, iVar);
|
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: A 32-bit signed integer or a double matrix expected.\n"), fname, iVar);
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
sciErr = getMatrixOfInteger32(pvApiCtx, piAddrVar, iRows, iCols, piValue);
|
sciErr = getMatrixOfInteger32(pvApiCtx, piAddrVar, iRows, iCols, piValue);
|
||||||
if (sciErr.iErr)
|
if (sciErr.iErr) {
|
||||||
{
|
|
||||||
printError(&sciErr, 0);
|
printError(&sciErr, 0);
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: A 32-bit signed integer or a double matrix expected.\n"), fname, iVar);
|
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: A 32-bit signed integer or a double matrix expected.\n"), fname, iVar);
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,8 +11,7 @@ SWIG_GetScilabList(SwigSciObject obj, int **piListAddr)
|
||||||
SciErr sciErr;
|
SciErr sciErr;
|
||||||
|
|
||||||
sciErr = getVarAddressFromPosition(pvApiCtx, obj, piListAddr);
|
sciErr = getVarAddressFromPosition(pvApiCtx, obj, piListAddr);
|
||||||
if (sciErr.iErr)
|
if (sciErr.iErr) {
|
||||||
{
|
|
||||||
printError(&sciErr, 0);
|
printError(&sciErr, 0);
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
|
|
@ -27,15 +26,13 @@ SWIG_GetScilabListSize(SwigSciObject obj, int *piListSize)
|
||||||
int *piListAddr;
|
int *piListAddr;
|
||||||
|
|
||||||
sciErr = getVarAddressFromPosition(pvApiCtx, obj, &piListAddr);
|
sciErr = getVarAddressFromPosition(pvApiCtx, obj, &piListAddr);
|
||||||
if (sciErr.iErr)
|
if (sciErr.iErr) {
|
||||||
{
|
|
||||||
printError(&sciErr, 0);
|
printError(&sciErr, 0);
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
sciErr = getListItemNumber(pvApiCtx, piListAddr, piListSize);
|
sciErr = getListItemNumber(pvApiCtx, piListAddr, piListSize);
|
||||||
if (sciErr.iErr)
|
if (sciErr.iErr) {
|
||||||
{
|
|
||||||
printError(&sciErr, 0);
|
printError(&sciErr, 0);
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
|
|
@ -49,15 +46,13 @@ SWIG_GetScilabListAndSize(SwigSciObject obj, int **piListAddr, int *piListSize)
|
||||||
SciErr sciErr;
|
SciErr sciErr;
|
||||||
|
|
||||||
sciErr = getVarAddressFromPosition(pvApiCtx, obj, piListAddr);
|
sciErr = getVarAddressFromPosition(pvApiCtx, obj, piListAddr);
|
||||||
if (sciErr.iErr)
|
if (sciErr.iErr) {
|
||||||
{
|
|
||||||
printError(&sciErr, 0);
|
printError(&sciErr, 0);
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
sciErr = getListItemNumber(pvApiCtx, *piListAddr, piListSize);
|
sciErr = getListItemNumber(pvApiCtx, *piListAddr, piListSize);
|
||||||
if (sciErr.iErr)
|
if (sciErr.iErr) {
|
||||||
{
|
|
||||||
printError(&sciErr, 0);
|
printError(&sciErr, 0);
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
|
|
@ -73,21 +68,18 @@ SWIG_CheckScilabList(SwigSciObject obj)
|
||||||
int iType;
|
int iType;
|
||||||
|
|
||||||
sciErr = getVarAddressFromPosition(pvApiCtx, obj, &piListAddr);
|
sciErr = getVarAddressFromPosition(pvApiCtx, obj, &piListAddr);
|
||||||
if (sciErr.iErr)
|
if (sciErr.iErr) {
|
||||||
{
|
|
||||||
printError(&sciErr, 0);
|
printError(&sciErr, 0);
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
sciErr = getVarType(pvApiCtx, piListAddr, &iType);
|
sciErr = getVarType(pvApiCtx, piListAddr, &iType);
|
||||||
if (sciErr.iErr)
|
if (sciErr.iErr) {
|
||||||
{
|
|
||||||
printError(&sciErr, 0);
|
printError(&sciErr, 0);
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((iType != sci_list) && (iType != sci_tlist) && (iType != sci_mlist))
|
if ((iType != sci_list) && (iType != sci_tlist) && (iType != sci_mlist)) {
|
||||||
{
|
|
||||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: A list is expected.\n"), SWIG_Scilab_GetFname(), obj);
|
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: A list is expected.\n"), SWIG_Scilab_GetFname(), obj);
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,7 @@
|
||||||
|
|
||||||
%typemap(in, noblock=1, fragment="SWIG_SciBoolean_AsBoolArrayAndSize") (bool *IN, int IN_ROWCOUNT, int IN_COLCOUNT)
|
%typemap(in, noblock=1, fragment="SWIG_SciBoolean_AsBoolArrayAndSize") (bool *IN, int IN_ROWCOUNT, int IN_COLCOUNT)
|
||||||
{
|
{
|
||||||
if (SWIG_SciBoolean_AsBoolArrayAndSize(pvApiCtx, $input, &$2, &$3, &$1, fname) != SWIG_OK)
|
if (SWIG_SciBoolean_AsBoolArrayAndSize(pvApiCtx, $input, &$2, &$3, &$1, fname) != SWIG_OK) {
|
||||||
{
|
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -19,8 +18,7 @@
|
||||||
|
|
||||||
%typemap(in, noblock=1, fragment="SWIG_SciBoolean_AsBoolArrayAndSize") (int IN_ROWCOUNT, int IN_COLCOUNT, bool *IN)
|
%typemap(in, noblock=1, fragment="SWIG_SciBoolean_AsBoolArrayAndSize") (int IN_ROWCOUNT, int IN_COLCOUNT, bool *IN)
|
||||||
{
|
{
|
||||||
if (SWIG_SciBoolean_AsBoolArrayAndSize(pvApiCtx, $input, &$1, &$2, &$3, fname) != SWIG_OK)
|
if (SWIG_SciBoolean_AsBoolArrayAndSize(pvApiCtx, $input, &$1, &$2, &$3, fname) != SWIG_OK) {
|
||||||
{
|
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -31,12 +29,10 @@
|
||||||
{
|
{
|
||||||
int rowCount;
|
int rowCount;
|
||||||
int colCount;
|
int colCount;
|
||||||
if (SWIG_SciBoolean_AsBoolArrayAndSize(pvApiCtx, $input, &rowCount, &colCount, &$1, fname) == SWIG_OK)
|
if (SWIG_SciBoolean_AsBoolArrayAndSize(pvApiCtx, $input, &rowCount, &colCount, &$1, fname) == SWIG_OK) {
|
||||||
{
|
|
||||||
$2 = rowCount * colCount;
|
$2 = rowCount * colCount;
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -47,12 +43,10 @@
|
||||||
{
|
{
|
||||||
int rowCount;
|
int rowCount;
|
||||||
int colCount;
|
int colCount;
|
||||||
if (SWIG_SciBoolean_AsBoolArrayAndSize(pvApiCtx, $input, &rowCount, &colCount, &$2, fname) == SWIG_OK)
|
if (SWIG_SciBoolean_AsBoolArrayAndSize(pvApiCtx, $input, &rowCount, &colCount, &$2, fname) == SWIG_OK) {
|
||||||
{
|
|
||||||
$1 = rowCount * colCount;
|
$1 = rowCount * colCount;
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -80,12 +74,10 @@
|
||||||
|
|
||||||
%typemap(argout, noblock=1, fragment="SWIG_SciBoolean_FromBoolArrayAndSize") (bool **OUT, int *OUT_ROWCOUNT, int *OUT_COLCOUNT)
|
%typemap(argout, noblock=1, fragment="SWIG_SciBoolean_FromBoolArrayAndSize") (bool **OUT, int *OUT_ROWCOUNT, int *OUT_COLCOUNT)
|
||||||
{
|
{
|
||||||
if (SWIG_SciBoolean_FromBoolArrayAndSize(pvApiCtx, SWIG_Scilab_GetOutputPosition(), *$2, *$3, *$1) == SWIG_OK)
|
if (SWIG_SciBoolean_FromBoolArrayAndSize(pvApiCtx, SWIG_Scilab_GetOutputPosition(), *$2, *$3, *$1) == SWIG_OK) {
|
||||||
{
|
|
||||||
SWIG_Scilab_SetOutput(pvApiCtx, SWIG_NbInputArgument(pvApiCtx) + SWIG_Scilab_GetOutputPosition());
|
SWIG_Scilab_SetOutput(pvApiCtx, SWIG_NbInputArgument(pvApiCtx) + SWIG_Scilab_GetOutputPosition());
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -105,12 +97,10 @@
|
||||||
|
|
||||||
%typemap(argout, noblock=1, fragment="SWIG_SciBoolean_FromBoolArrayAndSize") (int *OUT_ROWCOUNT, int *OUT_COLCOUNT, bool **OUT)
|
%typemap(argout, noblock=1, fragment="SWIG_SciBoolean_FromBoolArrayAndSize") (int *OUT_ROWCOUNT, int *OUT_COLCOUNT, bool **OUT)
|
||||||
{
|
{
|
||||||
if (SWIG_SciBoolean_FromBoolArrayAndSize(pvApiCtx, SWIG_Scilab_GetOutputPosition(), *$1, *$2, *$3) == SWIG_OK)
|
if (SWIG_SciBoolean_FromBoolArrayAndSize(pvApiCtx, SWIG_Scilab_GetOutputPosition(), *$1, *$2, *$3) == SWIG_OK) {
|
||||||
{
|
|
||||||
SWIG_Scilab_SetOutput(pvApiCtx, SWIG_NbInputArgument(pvApiCtx) + SWIG_Scilab_GetOutputPosition());
|
SWIG_Scilab_SetOutput(pvApiCtx, SWIG_NbInputArgument(pvApiCtx) + SWIG_Scilab_GetOutputPosition());
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -138,12 +128,10 @@
|
||||||
|
|
||||||
%typemap(argout, noblock=1, fragment="SWIG_SciBoolean_FromBoolArrayAndSize") (bool **OUT, int *OUT_SIZE)
|
%typemap(argout, noblock=1, fragment="SWIG_SciBoolean_FromBoolArrayAndSize") (bool **OUT, int *OUT_SIZE)
|
||||||
{
|
{
|
||||||
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) {
|
||||||
{
|
|
||||||
SWIG_Scilab_SetOutput(pvApiCtx, SWIG_NbInputArgument(pvApiCtx) + SWIG_Scilab_GetOutputPosition());
|
SWIG_Scilab_SetOutput(pvApiCtx, SWIG_NbInputArgument(pvApiCtx) + SWIG_Scilab_GetOutputPosition());
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -170,12 +158,10 @@
|
||||||
|
|
||||||
%typemap(argout, noblock=1, fragment="SWIG_SciBoolean_FromBoolArrayAndSize") (int *OUT_SIZE, bool **OUT)
|
%typemap(argout, noblock=1, fragment="SWIG_SciBoolean_FromBoolArrayAndSize") (int *OUT_SIZE, bool **OUT)
|
||||||
{
|
{
|
||||||
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) {
|
||||||
{
|
|
||||||
SWIG_Scilab_SetOutput(pvApiCtx, SWIG_NbInputArgument(pvApiCtx) + SWIG_Scilab_GetOutputPosition());
|
SWIG_Scilab_SetOutput(pvApiCtx, SWIG_NbInputArgument(pvApiCtx) + SWIG_Scilab_GetOutputPosition());
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,7 @@
|
||||||
|
|
||||||
%typemap(in, noblock=1, fragment="SWIG_SciString_AsCharPtrArrayAndSize") (char **IN, int IN_ROWCOUNT, int IN_COLCOUNT)
|
%typemap(in, noblock=1, fragment="SWIG_SciString_AsCharPtrArrayAndSize") (char **IN, int IN_ROWCOUNT, int IN_COLCOUNT)
|
||||||
{
|
{
|
||||||
if (SWIG_SciString_AsCharPtrArrayAndSize(pvApiCtx, $input, &$2, &$3, &$1, fname) != SWIG_OK)
|
if (SWIG_SciString_AsCharPtrArrayAndSize(pvApiCtx, $input, &$2, &$3, &$1, fname) != SWIG_OK) {
|
||||||
{
|
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -19,8 +18,7 @@
|
||||||
|
|
||||||
%typemap(in, noblock=1, fragment="SWIG_SciString_AsCharPtrArrayAndSize") (int IN_ROWCOUNT, int IN_COLCOUNT, char **IN)
|
%typemap(in, noblock=1, fragment="SWIG_SciString_AsCharPtrArrayAndSize") (int IN_ROWCOUNT, int IN_COLCOUNT, char **IN)
|
||||||
{
|
{
|
||||||
if (SWIG_SciString_AsCharPtrArrayAndSize(pvApiCtx, $input, &$1, &$2, &$3, fname) != SWIG_OK)
|
if (SWIG_SciString_AsCharPtrArrayAndSize(pvApiCtx, $input, &$1, &$2, &$3, fname) != SWIG_OK {
|
||||||
{
|
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -31,12 +29,10 @@
|
||||||
{
|
{
|
||||||
int rowCount;
|
int rowCount;
|
||||||
int colCount;
|
int colCount;
|
||||||
if (SWIG_SciString_AsCharPtrArrayAndSize(pvApiCtx, $input, &rowCount, &colCount, &$1, fname) == SWIG_OK)
|
if (SWIG_SciString_AsCharPtrArrayAndSize(pvApiCtx, $input, &rowCount, &colCount, &$1, fname) == SWIG_OK) {
|
||||||
{
|
|
||||||
$2 = rowCount * colCount;
|
$2 = rowCount * colCount;
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -47,12 +43,10 @@
|
||||||
{
|
{
|
||||||
int rowCount;
|
int rowCount;
|
||||||
int colCount;
|
int colCount;
|
||||||
if (SWIG_SciString_AsCharPtrArrayAndSize(pvApiCtx, $input, &rowCount, &colCount, &$2, fname) == SWIG_OK)
|
if (SWIG_SciString_AsCharPtrArrayAndSize(pvApiCtx, $input, &rowCount, &colCount, &$2, fname) == SWIG_OK) {
|
||||||
{
|
|
||||||
$1 = rowCount * colCount;
|
$1 = rowCount * colCount;
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -72,12 +66,10 @@
|
||||||
|
|
||||||
%typemap(argout, noblock=1, fragment="SWIG_SciString_FromCharPtrArrayAndSize") (char ***OUT, int *OUT_ROWCOUNT, int *OUT_COLCOUNT)
|
%typemap(argout, noblock=1, fragment="SWIG_SciString_FromCharPtrArrayAndSize") (char ***OUT, int *OUT_ROWCOUNT, int *OUT_COLCOUNT)
|
||||||
{
|
{
|
||||||
if (SWIG_SciString_FromCharPtrArrayAndSize(pvApiCtx, SWIG_Scilab_GetOutputPosition(), *$2, *$3, *$1) == SWIG_OK)
|
if (SWIG_SciString_FromCharPtrArrayAndSize(pvApiCtx, SWIG_Scilab_GetOutputPosition(), *$2, *$3, *$1) == SWIG_OK) {
|
||||||
{
|
|
||||||
SWIG_Scilab_SetOutput(pvApiCtx, SWIG_NbInputArgument(pvApiCtx) + SWIG_Scilab_GetOutputPosition());
|
SWIG_Scilab_SetOutput(pvApiCtx, SWIG_NbInputArgument(pvApiCtx) + SWIG_Scilab_GetOutputPosition());
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -110,12 +102,10 @@
|
||||||
|
|
||||||
%typemap(argout, noblock=1, fragment="SWIG_SciString_FromCharPtrArrayAndSize") (int *OUT_ROWCOUNT, int *OUT_COLCOUNT, char ***OUT)
|
%typemap(argout, noblock=1, fragment="SWIG_SciString_FromCharPtrArrayAndSize") (int *OUT_ROWCOUNT, int *OUT_COLCOUNT, char ***OUT)
|
||||||
{
|
{
|
||||||
if (SWIG_SciString_FromCharPtrArrayAndSize(pvApiCtx, SWIG_Scilab_GetOutputPosition(), *$1, *$2, *$3) == SWIG_OK)
|
if (SWIG_SciString_FromCharPtrArrayAndSize(pvApiCtx, SWIG_Scilab_GetOutputPosition(), *$1, *$2, *$3) == SWIG_OK) {
|
||||||
{
|
|
||||||
SWIG_Scilab_SetOutput(pvApiCtx, SWIG_NbInputArgument(pvApiCtx) + SWIG_Scilab_GetOutputPosition());
|
SWIG_Scilab_SetOutput(pvApiCtx, SWIG_NbInputArgument(pvApiCtx) + SWIG_Scilab_GetOutputPosition());
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -160,12 +150,10 @@
|
||||||
|
|
||||||
%typemap(argout, noblock=1, fragment="SWIG_SciString_FromCharPtrArrayAndSize") (char ***OUT, int *OUT_SIZE)
|
%typemap(argout, noblock=1, fragment="SWIG_SciString_FromCharPtrArrayAndSize") (char ***OUT, int *OUT_SIZE)
|
||||||
{
|
{
|
||||||
if (SWIG_SciString_FromCharPtrArrayAndSize(pvApiCtx, SWIG_Scilab_GetOutputPosition(), 1, *$2, *$1) == SWIG_OK)
|
if (SWIG_SciString_FromCharPtrArrayAndSize(pvApiCtx, SWIG_Scilab_GetOutputPosition(), 1, *$2, *$1) == SWIG_OK) {
|
||||||
{
|
|
||||||
SWIG_Scilab_SetOutput(pvApiCtx, SWIG_NbInputArgument(pvApiCtx) + SWIG_Scilab_GetOutputPosition());
|
SWIG_Scilab_SetOutput(pvApiCtx, SWIG_NbInputArgument(pvApiCtx) + SWIG_Scilab_GetOutputPosition());
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -174,8 +162,7 @@
|
||||||
|
|
||||||
%typemap(in, noblock=1, fragment="SWIG_SciString_AsCharPtrArrayAndSize") (int IN_SIZE, char **IN)
|
%typemap(in, noblock=1, fragment="SWIG_SciString_AsCharPtrArrayAndSize") (int IN_SIZE, char **IN)
|
||||||
{
|
{
|
||||||
if (SWIG_SciString_AsCharPtrArrayAndSize(pvApiCtx, $input, 1, &$1, &$2, fname) != SWIG_OK)
|
if (SWIG_SciString_AsCharPtrArrayAndSize(pvApiCtx, $input, 1, &$1, &$2, fname) != SWIG_OK) {
|
||||||
{
|
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -194,12 +181,10 @@
|
||||||
|
|
||||||
%typemap(argout, noblock=1, fragment="SWIG_SciString_FromCharPtrArrayAndSize") (int *OUT_SIZE, char ***OUT)
|
%typemap(argout, noblock=1, fragment="SWIG_SciString_FromCharPtrArrayAndSize") (int *OUT_SIZE, char ***OUT)
|
||||||
{
|
{
|
||||||
if (SWIG_SciString_FromCharPtrArrayAndSize(pvApiCtx, SWIG_Scilab_GetOutputPosition(), 1, *$1, *$2) == SWIG_OK)
|
if (SWIG_SciString_FromCharPtrArrayAndSize(pvApiCtx, SWIG_Scilab_GetOutputPosition(), 1, *$1, *$2) == SWIG_OK) {
|
||||||
{
|
|
||||||
SWIG_Scilab_SetOutput(pvApiCtx, SWIG_NbInputArgument(pvApiCtx) + SWIG_Scilab_GetOutputPosition());
|
SWIG_Scilab_SetOutput(pvApiCtx, SWIG_NbInputArgument(pvApiCtx) + SWIG_Scilab_GetOutputPosition());
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,7 @@
|
||||||
|
|
||||||
%typemap(in, noblock=1, fragment="SWIG_SciDouble_AsDoubleArrayAndSize") (double *IN, int IN_ROWCOUNT, int IN_COLCOUNT)
|
%typemap(in, noblock=1, fragment="SWIG_SciDouble_AsDoubleArrayAndSize") (double *IN, int IN_ROWCOUNT, int IN_COLCOUNT)
|
||||||
{
|
{
|
||||||
if (SWIG_SciDouble_AsDoubleArrayAndSize(pvApiCtx, $input, &$2, &$3, &$1, fname) != SWIG_OK)
|
if (SWIG_SciDouble_AsDoubleArrayAndSize(pvApiCtx, $input, &$2, &$3, &$1, fname) != SWIG_OK) {
|
||||||
{
|
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -19,8 +18,7 @@
|
||||||
|
|
||||||
%typemap(in, noblock=1, fragment="SWIG_SciDouble_AsDoubleArrayAndSize") (int IN_ROWCOUNT, int IN_COLCOUNT, double *IN)
|
%typemap(in, noblock=1, fragment="SWIG_SciDouble_AsDoubleArrayAndSize") (int IN_ROWCOUNT, int IN_COLCOUNT, double *IN)
|
||||||
{
|
{
|
||||||
if (SWIG_SciDouble_AsDoubleArrayAndSize(pvApiCtx, $input, &$1, &$2, &$3, fname) != SWIG_OK)
|
if (SWIG_SciDouble_AsDoubleArrayAndSize(pvApiCtx, $input, &$1, &$2, &$3, fname) != SWIG_OK) {
|
||||||
{
|
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -31,12 +29,10 @@
|
||||||
{
|
{
|
||||||
int rowCount;
|
int rowCount;
|
||||||
int colCount;
|
int colCount;
|
||||||
if (SWIG_SciDouble_AsDoubleArrayAndSize(pvApiCtx, $input, &rowCount, &colCount, &$1, fname) == SWIG_OK)
|
if (SWIG_SciDouble_AsDoubleArrayAndSize(pvApiCtx, $input, &rowCount, &colCount, &$1, fname) == SWIG_OK) {
|
||||||
{
|
|
||||||
$2 = rowCount * colCount;
|
$2 = rowCount * colCount;
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -47,12 +43,10 @@
|
||||||
{
|
{
|
||||||
int rowCount;
|
int rowCount;
|
||||||
int colCount;
|
int colCount;
|
||||||
if (SWIG_SciDouble_AsDoubleArrayAndSize(pvApiCtx, $input, &rowCount, &colCount, &$2, fname) == SWIG_OK)
|
if (SWIG_SciDouble_AsDoubleArrayAndSize(pvApiCtx, $input, &rowCount, &colCount, &$2, fname) == SWIG_OK) {
|
||||||
{
|
|
||||||
$1 = rowCount * colCount;
|
$1 = rowCount * colCount;
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -80,12 +74,10 @@
|
||||||
|
|
||||||
%typemap(argout, noblock=1, fragment="SWIG_SciDouble_FromDoubleArrayAndSize") (double **OUT, int *OUT_ROWCOUNT, int *OUT_COLCOUNT)
|
%typemap(argout, noblock=1, fragment="SWIG_SciDouble_FromDoubleArrayAndSize") (double **OUT, int *OUT_ROWCOUNT, int *OUT_COLCOUNT)
|
||||||
{
|
{
|
||||||
if (SWIG_SciDouble_FromDoubleArrayAndSize(pvApiCtx, SWIG_Scilab_GetOutputPosition(), *$2, *$3, *$1) == SWIG_OK)
|
if (SWIG_SciDouble_FromDoubleArrayAndSize(pvApiCtx, SWIG_Scilab_GetOutputPosition(), *$2, *$3, *$1) == SWIG_OK) {
|
||||||
{
|
|
||||||
SWIG_Scilab_SetOutput(pvApiCtx, SWIG_NbInputArgument(pvApiCtx) + SWIG_Scilab_GetOutputPosition());
|
SWIG_Scilab_SetOutput(pvApiCtx, SWIG_NbInputArgument(pvApiCtx) + SWIG_Scilab_GetOutputPosition());
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -105,12 +97,10 @@
|
||||||
|
|
||||||
%typemap(argout, noblock=1, fragment="SWIG_SciDouble_FromDoubleArrayAndSize") (int *IN_ROWCOUNT, int *IN_COLCOUNT, double **OUT)
|
%typemap(argout, noblock=1, fragment="SWIG_SciDouble_FromDoubleArrayAndSize") (int *IN_ROWCOUNT, int *IN_COLCOUNT, double **OUT)
|
||||||
{
|
{
|
||||||
if (SWIG_SciDouble_FromDoubleArrayAndSize(pvApiCtx, SWIG_Scilab_GetOutputPosition(), *$1, *$2, *$3) == SWIG_OK)
|
if (SWIG_SciDouble_FromDoubleArrayAndSize(pvApiCtx, SWIG_Scilab_GetOutputPosition(), *$1, *$2, *$3) == SWIG_OK) {
|
||||||
{
|
|
||||||
SWIG_Scilab_SetOutput(pvApiCtx, SWIG_NbInputArgument(pvApiCtx) + SWIG_Scilab_GetOutputPosition());
|
SWIG_Scilab_SetOutput(pvApiCtx, SWIG_NbInputArgument(pvApiCtx) + SWIG_Scilab_GetOutputPosition());
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -138,12 +128,10 @@
|
||||||
|
|
||||||
%typemap(argout, noblock=1, fragment="SWIG_SciDouble_FromDoubleArrayAndSize") (double **OUT, int *OUT_SIZE)
|
%typemap(argout, noblock=1, fragment="SWIG_SciDouble_FromDoubleArrayAndSize") (double **OUT, int *OUT_SIZE)
|
||||||
{
|
{
|
||||||
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) {
|
||||||
{
|
|
||||||
SWIG_Scilab_SetOutput(pvApiCtx, SWIG_NbInputArgument(pvApiCtx) + SWIG_Scilab_GetOutputPosition());
|
SWIG_Scilab_SetOutput(pvApiCtx, SWIG_NbInputArgument(pvApiCtx) + SWIG_Scilab_GetOutputPosition());
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -170,12 +158,10 @@
|
||||||
|
|
||||||
%typemap(argout, noblock=1, fragment="SWIG_SciDouble_FromDoubleArrayAndSize") (int *OUT_SIZE, double **OUT)
|
%typemap(argout, noblock=1, fragment="SWIG_SciDouble_FromDoubleArrayAndSize") (int *OUT_SIZE, double **OUT)
|
||||||
{
|
{
|
||||||
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) {
|
||||||
{
|
|
||||||
SWIG_Scilab_SetOutput(pvApiCtx, SWIG_NbInputArgument(pvApiCtx) + SWIG_Scilab_GetOutputPosition());
|
SWIG_Scilab_SetOutput(pvApiCtx, SWIG_NbInputArgument(pvApiCtx) + SWIG_Scilab_GetOutputPosition());
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,7 @@
|
||||||
|
|
||||||
%typemap(in, noblock=1, fragment="SWIG_SciDoubleOrInt32_AsIntArrayAndSize") (int *IN, int IN_ROWCOUNT, int IN_COLCOUNT)
|
%typemap(in, noblock=1, fragment="SWIG_SciDoubleOrInt32_AsIntArrayAndSize") (int *IN, int IN_ROWCOUNT, int IN_COLCOUNT)
|
||||||
{
|
{
|
||||||
if (SWIG_SciDoubleOrInt32_AsIntArrayAndSize(pvApiCtx, $input, &$2, &$3, &$1, fname) != SWIG_OK)
|
if (SWIG_SciDoubleOrInt32_AsIntArrayAndSize(pvApiCtx, $input, &$2, &$3, &$1, fname) != SWIG_OK) {
|
||||||
{
|
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -20,8 +19,7 @@
|
||||||
|
|
||||||
%typemap(in, noblock=1, fragment="SWIG_SciDoubleOrInt32_AsIntArrayAndSize") (int IN_ROWCOUNT, int IN_COLCOUNT, int *IN)
|
%typemap(in, noblock=1, fragment="SWIG_SciDoubleOrInt32_AsIntArrayAndSize") (int IN_ROWCOUNT, int IN_COLCOUNT, int *IN)
|
||||||
{
|
{
|
||||||
if (SWIG_SciDoubleOrInt32_AsIntArrayAndSize(pvApiCtx, $input, &$1, &$2, &$3, fname) != SWIG_OK)
|
if (SWIG_SciDoubleOrInt32_AsIntArrayAndSize(pvApiCtx, $input, &$1, &$2, &$3, fname) != SWIG_OK) {
|
||||||
{
|
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -33,12 +31,10 @@
|
||||||
{
|
{
|
||||||
int rowCount;
|
int rowCount;
|
||||||
int colCount;
|
int colCount;
|
||||||
if (SWIG_SciDoubleOrInt32_AsIntArrayAndSize(pvApiCtx, $input, &rowCount, &colCount, &$1, fname) == SWIG_OK)
|
if (SWIG_SciDoubleOrInt32_AsIntArrayAndSize(pvApiCtx, $input, &rowCount, &colCount, &$1, fname) == SWIG_OK) {
|
||||||
{
|
|
||||||
$2 = rowCount * colCount;
|
$2 = rowCount * colCount;
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -50,12 +46,10 @@
|
||||||
{
|
{
|
||||||
int rowCount;
|
int rowCount;
|
||||||
int colCount;
|
int colCount;
|
||||||
if (SWIG_SciDoubleOrInt32_AsIntArrayAndSize(pvApiCtx, $input, &rowCount, &colCount, &$2, fname) == SWIG_OK)
|
if (SWIG_SciDoubleOrInt32_AsIntArrayAndSize(pvApiCtx, $input, &rowCount, &colCount, &$2, fname) == SWIG_OK) {
|
||||||
{
|
|
||||||
$1 = rowCount * colCount;
|
$1 = rowCount * colCount;
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -75,12 +69,10 @@
|
||||||
|
|
||||||
%typemap(argout, noblock=1, fragment="SWIG_SciDouble_FromIntArrayAndSize") (int **OUT, int *OUT_ROWCOUNT, int *OUT_COLCOUNT)
|
%typemap(argout, noblock=1, fragment="SWIG_SciDouble_FromIntArrayAndSize") (int **OUT, int *OUT_ROWCOUNT, int *OUT_COLCOUNT)
|
||||||
{
|
{
|
||||||
if (SWIG_SciDouble_FromIntArrayAndSize(pvApiCtx, SWIG_Scilab_GetOutputPosition(), *$2, *$3, *$1) == SWIG_OK)
|
if (SWIG_SciDouble_FromIntArrayAndSize(pvApiCtx, SWIG_Scilab_GetOutputPosition(), *$2, *$3, *$1) == SWIG_OK) {
|
||||||
{
|
|
||||||
SWIG_Scilab_SetOutput(pvApiCtx, SWIG_NbInputArgument(pvApiCtx) + SWIG_Scilab_GetOutputPosition());
|
SWIG_Scilab_SetOutput(pvApiCtx, SWIG_NbInputArgument(pvApiCtx) + SWIG_Scilab_GetOutputPosition());
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -109,12 +101,10 @@
|
||||||
|
|
||||||
%typemap(argout, noblock=1, fragment="SWIG_SciDouble_FromIntArrayAndSize") (int *OUT_ROWCOUNT, int *OUT_COLCOUNT, int **OUT)
|
%typemap(argout, noblock=1, fragment="SWIG_SciDouble_FromIntArrayAndSize") (int *OUT_ROWCOUNT, int *OUT_COLCOUNT, int **OUT)
|
||||||
{
|
{
|
||||||
if (SWIG_SciDouble_FromIntArrayAndSize(pvApiCtx, SWIG_Scilab_GetOutputPosition(), *$1, *$2, *$3) == SWIG_OK)
|
if (SWIG_SciDouble_FromIntArrayAndSize(pvApiCtx, SWIG_Scilab_GetOutputPosition(), *$1, *$2, *$3) == SWIG_OK) {
|
||||||
{
|
|
||||||
SWIG_Scilab_SetOutput(pvApiCtx, SWIG_NbInputArgument(pvApiCtx) + SWIG_Scilab_GetOutputPosition());
|
SWIG_Scilab_SetOutput(pvApiCtx, SWIG_NbInputArgument(pvApiCtx) + SWIG_Scilab_GetOutputPosition());
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -142,12 +132,10 @@
|
||||||
|
|
||||||
%typemap(argout, noblock=1, fragment="SWIG_SciDouble_FromIntArrayAndSize") (int **OUT, int *OUT_SIZE)
|
%typemap(argout, noblock=1, fragment="SWIG_SciDouble_FromIntArrayAndSize") (int **OUT, int *OUT_SIZE)
|
||||||
{
|
{
|
||||||
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) {
|
||||||
{
|
|
||||||
SWIG_Scilab_SetOutput(pvApiCtx, SWIG_NbInputArgument(pvApiCtx) + SWIG_Scilab_GetOutputPosition());
|
SWIG_Scilab_SetOutput(pvApiCtx, SWIG_NbInputArgument(pvApiCtx) + SWIG_Scilab_GetOutputPosition());
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -174,12 +162,10 @@
|
||||||
|
|
||||||
%typemap(argout, noblock=1, fragment="SWIG_SciDouble_FromIntArrayAndSize") (int *OUT_SIZE, int **OUT)
|
%typemap(argout, noblock=1, fragment="SWIG_SciDouble_FromIntArrayAndSize") (int *OUT_SIZE, int **OUT)
|
||||||
{
|
{
|
||||||
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) {
|
||||||
{
|
|
||||||
SWIG_Scilab_SetOutput(pvApiCtx, SWIG_NbInputArgument(pvApiCtx) + SWIG_Scilab_GetOutputPosition());
|
SWIG_Scilab_SetOutput(pvApiCtx, SWIG_NbInputArgument(pvApiCtx) + SWIG_Scilab_GetOutputPosition());
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,12 +19,10 @@ SWIG_AsCheck_Sequence_dec(bool)(SwigSciObject obj) {
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isBooleanType(pvApiCtx, piAddrVar))
|
if (isBooleanType(pvApiCtx, piAddrVar)) {
|
||||||
{
|
|
||||||
return SWIG_OK;
|
return SWIG_OK;
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: A boolean is expected.\n"), SWIG_Scilab_GetFname(), obj);
|
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: A boolean is expected.\n"), SWIG_Scilab_GetFname(), obj);
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,12 +19,10 @@ SWIG_AsCheck_Sequence_dec(double)(SwigSciObject obj) {
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isDoubleType(pvApiCtx, piAddrVar))
|
if (isDoubleType(pvApiCtx, piAddrVar)) {
|
||||||
{
|
|
||||||
return SWIG_OK;
|
return SWIG_OK;
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: A double is expected.\n"), SWIG_Scilab_GetFname(), obj);
|
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: A double is expected.\n"), SWIG_Scilab_GetFname(), obj);
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,12 +19,10 @@ SWIG_AsCheck_Sequence_dec(float)(SwigSciObject obj) {
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isDoubleType(pvApiCtx, piAddrVar))
|
if (isDoubleType(pvApiCtx, piAddrVar)) {
|
||||||
{
|
|
||||||
return SWIG_OK;
|
return SWIG_OK;
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: A double is expected.\n"), SWIG_Scilab_GetFname(), obj);
|
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: A double is expected.\n"), SWIG_Scilab_GetFname(), obj);
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -26,12 +26,10 @@ SWIG_AsCheck_Sequence_dec(int)(SwigSciObject obj) {
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((iType == sci_matrix) || (iType == sci_ints))
|
if ((iType == sci_matrix) || (iType == sci_ints)) {
|
||||||
{
|
|
||||||
return SWIG_OK;
|
return SWIG_OK;
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: An integer is expected.\n"), SWIG_Scilab_GetFname(), obj);
|
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: An integer is expected.\n"), SWIG_Scilab_GetFname(), obj);
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -58,17 +58,14 @@ SWIG_FromSet_Sequence_dec(ptr)(int size, uintptr_t *pSequence) {
|
||||||
int iVarOut = SWIG_NbInputArgument(pvApiCtx) + SWIG_Scilab_GetOutputPosition();
|
int iVarOut = SWIG_NbInputArgument(pvApiCtx) + SWIG_Scilab_GetOutputPosition();
|
||||||
|
|
||||||
sciErr = createList(pvApiCtx, iVarOut, size, &piListAddr);
|
sciErr = createList(pvApiCtx, iVarOut, size, &piListAddr);
|
||||||
if (sciErr.iErr)
|
if (sciErr.iErr) {
|
||||||
{
|
|
||||||
printError(&sciErr, 0);
|
printError(&sciErr, 0);
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i=0; i<size; i++)
|
for (int i=0; i<size; i++) {
|
||||||
{
|
|
||||||
sciErr = createPointerInList(pvApiCtx, iVarOut, piListAddr, i + 1, (void *)pSequence[i]);
|
sciErr = createPointerInList(pvApiCtx, iVarOut, piListAddr, i + 1, (void *)pSequence[i]);
|
||||||
if (sciErr.iErr)
|
if (sciErr.iErr) {
|
||||||
{
|
|
||||||
printError(&sciErr, 0);
|
printError(&sciErr, 0);
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
|
|
@ -89,28 +86,24 @@ SWIG_AsVal_SequenceItem_dec(ptr)(SwigSciObject obj, int *piSequence, int itemInd
|
||||||
void* pItemValue = NULL;
|
void* pItemValue = NULL;
|
||||||
|
|
||||||
sciErr = getListItemAddress(pvApiCtx, piSequence, itemIndex + 1, &piItemAddr);
|
sciErr = getListItemAddress(pvApiCtx, piSequence, itemIndex + 1, &piItemAddr);
|
||||||
if (sciErr.iErr)
|
if (sciErr.iErr) {
|
||||||
{
|
|
||||||
printError(&sciErr, 0);
|
printError(&sciErr, 0);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
sciErr = getVarType(pvApiCtx, piItemAddr, &iType);
|
sciErr = getVarType(pvApiCtx, piItemAddr, &iType);
|
||||||
if (sciErr.iErr)
|
if (sciErr.iErr) {
|
||||||
{
|
|
||||||
printError(&sciErr, 0);
|
printError(&sciErr, 0);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (iType != sci_pointer)
|
if (iType != sci_pointer) {
|
||||||
{
|
|
||||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: A pointer is expected at list item #%d.\n"), SWIG_Scilab_GetFname(), obj, itemIndex + 1);
|
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: A pointer is expected at list item #%d.\n"), SWIG_Scilab_GetFname(), obj, itemIndex + 1);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
sciErr = getPointerInList(pvApiCtx, piSequence, itemIndex + 1, &pItemValue);
|
sciErr = getPointerInList(pvApiCtx, piSequence, itemIndex + 1, &pItemValue);
|
||||||
if (sciErr.iErr)
|
if (sciErr.iErr) {
|
||||||
{
|
|
||||||
printError(&sciErr, 0);
|
printError(&sciErr, 0);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,12 +19,10 @@ SWIG_AsCheck_Sequence_dec(std::string)(SwigSciObject obj) {
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isStringType(pvApiCtx, piAddrVar))
|
if (isStringType(pvApiCtx, piAddrVar)) {
|
||||||
{
|
|
||||||
return SWIG_OK;
|
return SWIG_OK;
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: A string is expected.\n"), SWIG_Scilab_GetFname(), obj);
|
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: A string is expected.\n"), SWIG_Scilab_GetFname(), obj);
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -121,15 +121,13 @@ SWIG_SciDoubleOrInt16_AsShortArrayAndSize(void *pvApiCtx, int iVar, int *iRows,
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (iType == sci_matrix)
|
if (iType == sci_matrix) {
|
||||||
{
|
|
||||||
double *pdData = NULL;
|
double *pdData = NULL;
|
||||||
int size = 0;
|
int size = 0;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
sciErr = getMatrixOfDouble(pvApiCtx, piAddrVar, iRows, iCols, &pdData);
|
sciErr = getMatrixOfDouble(pvApiCtx, piAddrVar, iRows, iCols, &pdData);
|
||||||
if (sciErr.iErr)
|
if (sciErr.iErr) {
|
||||||
{
|
|
||||||
printError(&sciErr, 0);
|
printError(&sciErr, 0);
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
|
|
@ -139,12 +137,10 @@ SWIG_SciDoubleOrInt16_AsShortArrayAndSize(void *pvApiCtx, int iVar, int *iRows,
|
||||||
for (i = 0; i < size; i++)
|
for (i = 0; i < size; i++)
|
||||||
(*psValue)[i] = (short) pdData[i];
|
(*psValue)[i] = (short) pdData[i];
|
||||||
}
|
}
|
||||||
else if (iType == sci_ints)
|
else if (iType == sci_ints) {
|
||||||
{
|
|
||||||
int iPrec = 0;
|
int iPrec = 0;
|
||||||
sciErr = getMatrixOfIntegerPrecision(pvApiCtx, piAddrVar, &iPrec);
|
sciErr = getMatrixOfIntegerPrecision(pvApiCtx, piAddrVar, &iPrec);
|
||||||
if (sciErr.iErr)
|
if (sciErr.iErr) {
|
||||||
{
|
|
||||||
printError(&sciErr, 0);
|
printError(&sciErr, 0);
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
|
|
@ -159,8 +155,7 @@ SWIG_SciDoubleOrInt16_AsShortArrayAndSize(void *pvApiCtx, int iVar, int *iRows,
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: A 16-bit signed integer or a double matrix expected.\n"), fname, iVar);
|
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: A 16-bit signed integer or a double matrix expected.\n"), fname, iVar);
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -119,15 +119,13 @@ SWIG_SciDoubleOrInt8_AsSignedCharArrayAndSize(void *pvApiCtx, int iVar, int *iRo
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (iType == sci_matrix)
|
if (iType == sci_matrix) {
|
||||||
{
|
|
||||||
double *pdData = NULL;
|
double *pdData = NULL;
|
||||||
int size = 0;
|
int size = 0;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
sciErr = getMatrixOfDouble(pvApiCtx, piAddrVar, iRows, iCols, &pdData);
|
sciErr = getMatrixOfDouble(pvApiCtx, piAddrVar, iRows, iCols, &pdData);
|
||||||
if (sciErr.iErr)
|
if (sciErr.iErr) {
|
||||||
{
|
|
||||||
printError(&sciErr, 0);
|
printError(&sciErr, 0);
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
|
|
@ -137,12 +135,10 @@ SWIG_SciDoubleOrInt8_AsSignedCharArrayAndSize(void *pvApiCtx, int iVar, int *iRo
|
||||||
for (i = 0; i < size; i++)
|
for (i = 0; i < size; i++)
|
||||||
(*pscValue)[i] = (signed char) pdData[i];
|
(*pscValue)[i] = (signed char) pdData[i];
|
||||||
}
|
}
|
||||||
else if (iType == sci_ints)
|
else if (iType == sci_ints) {
|
||||||
{
|
|
||||||
int iPrec = 0;
|
int iPrec = 0;
|
||||||
sciErr = getMatrixOfIntegerPrecision(pvApiCtx, piAddrVar, &iPrec);
|
sciErr = getMatrixOfIntegerPrecision(pvApiCtx, piAddrVar, &iPrec);
|
||||||
if (sciErr.iErr)
|
if (sciErr.iErr) {
|
||||||
{
|
|
||||||
printError(&sciErr, 0);
|
printError(&sciErr, 0);
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
|
|
@ -157,8 +153,7 @@ SWIG_SciDoubleOrInt8_AsSignedCharArrayAndSize(void *pvApiCtx, int iVar, int *iRo
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: A 8-bit signed integer or a double matrix expected.\n"), fname, iVar);
|
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: A 8-bit signed integer or a double matrix expected.\n"), fname, iVar);
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -123,15 +123,13 @@ SWIG_SciUint8_AsUnsignedCharArrayAndSize(void *pvApiCtx, int iVar, int *iRows, i
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (iType == sci_matrix)
|
if (iType == sci_matrix) {
|
||||||
{
|
|
||||||
double *pdData = NULL;
|
double *pdData = NULL;
|
||||||
int size = 0;
|
int size = 0;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
sciErr = getMatrixOfDouble(pvApiCtx, piAddrVar, iRows, iCols, &pdData);
|
sciErr = getMatrixOfDouble(pvApiCtx, piAddrVar, iRows, iCols, &pdData);
|
||||||
if (sciErr.iErr)
|
if (sciErr.iErr) {
|
||||||
{
|
|
||||||
printError(&sciErr, 0);
|
printError(&sciErr, 0);
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
|
|
@ -141,30 +139,25 @@ SWIG_SciUint8_AsUnsignedCharArrayAndSize(void *pvApiCtx, int iVar, int *iRows, i
|
||||||
for (i = 0; i < size; i++)
|
for (i = 0; i < size; i++)
|
||||||
(*pucValue)[i] = (unsigned char) pdData[i];
|
(*pucValue)[i] = (unsigned char) pdData[i];
|
||||||
}
|
}
|
||||||
else if (iType == sci_ints)
|
else if (iType == sci_ints) {
|
||||||
{
|
|
||||||
sciErr = getMatrixOfIntegerPrecision(pvApiCtx, piAddrVar, &iPrec);
|
sciErr = getMatrixOfIntegerPrecision(pvApiCtx, piAddrVar, &iPrec);
|
||||||
if (sciErr.iErr)
|
if (sciErr.iErr) {
|
||||||
{
|
|
||||||
printError(&sciErr, 0);
|
printError(&sciErr, 0);
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (iPrec != SCI_UINT8)
|
if (iPrec != SCI_UINT8) {
|
||||||
{
|
|
||||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: A 8-bit unsigned integer or a double vector expected.\n"), fname, iVar);
|
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: A 8-bit unsigned integer or a double vector expected.\n"), fname, iVar);
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
sciErr = getMatrixOfUnsignedInteger8(pvApiCtx, piAddrVar, iRows, iCols, pucValue);
|
sciErr = getMatrixOfUnsignedInteger8(pvApiCtx, piAddrVar, iRows, iCols, pucValue);
|
||||||
if (sciErr.iErr)
|
if (sciErr.iErr) {
|
||||||
{
|
|
||||||
printError(&sciErr, 0);
|
printError(&sciErr, 0);
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: A 8-bit unsigned integer or a double vector expected.\n"), fname, iVar);
|
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: A 8-bit unsigned integer or a double vector expected.\n"), fname, iVar);
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
|
|
@ -185,8 +178,7 @@ SWIG_SciUint8_FromUnsignedCharArrayAndSize(void *pvApiCtx, int iVarOut, int iRow
|
||||||
pdValues[i] = pucValues[i];
|
pdValues[i] = pucValues[i];
|
||||||
|
|
||||||
sciErr = createMatrixOfDouble(pvApiCtx, SWIG_NbInputArgument(pvApiCtx) + iVarOut, iRows, iCols, pdValues);
|
sciErr = createMatrixOfDouble(pvApiCtx, SWIG_NbInputArgument(pvApiCtx) + iVarOut, iRows, iCols, pdValues);
|
||||||
if (sciErr.iErr)
|
if (sciErr.iErr) {
|
||||||
{
|
|
||||||
printError(&sciErr, 0);
|
printError(&sciErr, 0);
|
||||||
free(pdValues);
|
free(pdValues);
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
|
|
|
||||||
|
|
@ -123,15 +123,13 @@ SWIG_SciUint32_AsUnsignedIntArrayAndSize(void *pvApiCtx, int iVar, int *iRows, i
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (iType == sci_matrix)
|
if (iType == sci_matrix) {
|
||||||
{
|
|
||||||
double *pdData = NULL;
|
double *pdData = NULL;
|
||||||
int size = 0;
|
int size = 0;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
sciErr = getMatrixOfDouble(pvApiCtx, piAddrVar, iRows, iCols, &pdData);
|
sciErr = getMatrixOfDouble(pvApiCtx, piAddrVar, iRows, iCols, &pdData);
|
||||||
if (sciErr.iErr)
|
if (sciErr.iErr) {
|
||||||
{
|
|
||||||
printError(&sciErr, 0);
|
printError(&sciErr, 0);
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
|
|
@ -141,30 +139,25 @@ SWIG_SciUint32_AsUnsignedIntArrayAndSize(void *pvApiCtx, int iVar, int *iRows, i
|
||||||
for (i = 0; i < size; i++)
|
for (i = 0; i < size; i++)
|
||||||
(*puiValue)[i] = (unsigned int) pdData[i];
|
(*puiValue)[i] = (unsigned int) pdData[i];
|
||||||
}
|
}
|
||||||
else if (iType == sci_ints)
|
else if (iType == sci_ints) {
|
||||||
{
|
|
||||||
sciErr = getMatrixOfIntegerPrecision(pvApiCtx, piAddrVar, &iPrec);
|
sciErr = getMatrixOfIntegerPrecision(pvApiCtx, piAddrVar, &iPrec);
|
||||||
if (sciErr.iErr)
|
if (sciErr.iErr) {
|
||||||
{
|
|
||||||
printError(&sciErr, 0);
|
printError(&sciErr, 0);
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (iPrec != SCI_UINT32)
|
if (iPrec != SCI_UINT32) {
|
||||||
{
|
|
||||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: A 32-bit unsigned integer or a double vector expected.\n"), fname, iVar);
|
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: A 32-bit unsigned integer or a double vector expected.\n"), fname, iVar);
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
sciErr = getMatrixOfUnsignedInteger32(pvApiCtx, piAddrVar, iRows, iCols, puiValue);
|
sciErr = getMatrixOfUnsignedInteger32(pvApiCtx, piAddrVar, iRows, iCols, puiValue);
|
||||||
if (sciErr.iErr)
|
if (sciErr.iErr) {
|
||||||
{
|
|
||||||
printError(&sciErr, 0);
|
printError(&sciErr, 0);
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: A 32-bit unsigned integer or a double vector expected.\n"), fname, iVar);
|
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: A 32-bit unsigned integer or a double vector expected.\n"), fname, iVar);
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -122,15 +122,13 @@ SWIG_SciUint16_AsUnsignedShortArrayAndSize(void *pvApiCtx, int iVar, int *iRows,
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (iType == sci_matrix)
|
if (iType == sci_matrix) {
|
||||||
{
|
|
||||||
double *pdData = NULL;
|
double *pdData = NULL;
|
||||||
int size = 0;
|
int size = 0;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
sciErr = getMatrixOfDouble(pvApiCtx, piAddrVar, iRows, iCols, &pdData);
|
sciErr = getMatrixOfDouble(pvApiCtx, piAddrVar, iRows, iCols, &pdData);
|
||||||
if (sciErr.iErr)
|
if (sciErr.iErr) {
|
||||||
{
|
|
||||||
printError(&sciErr, 0);
|
printError(&sciErr, 0);
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
|
|
@ -140,30 +138,25 @@ SWIG_SciUint16_AsUnsignedShortArrayAndSize(void *pvApiCtx, int iVar, int *iRows,
|
||||||
for (i = 0; i < size; i++)
|
for (i = 0; i < size; i++)
|
||||||
(*pusValue)[i] = (unsigned short) pdData[i];
|
(*pusValue)[i] = (unsigned short) pdData[i];
|
||||||
}
|
}
|
||||||
else if (iType == sci_ints)
|
else if (iType == sci_ints) {
|
||||||
{
|
|
||||||
sciErr = getMatrixOfIntegerPrecision(pvApiCtx, piAddrVar, &iPrec);
|
sciErr = getMatrixOfIntegerPrecision(pvApiCtx, piAddrVar, &iPrec);
|
||||||
if (sciErr.iErr)
|
if (sciErr.iErr) {
|
||||||
{
|
|
||||||
printError(&sciErr, 0);
|
printError(&sciErr, 0);
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (iPrec != SCI_UINT16)
|
if (iPrec != SCI_UINT16) {
|
||||||
{
|
|
||||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: A 16-bit unsigned integer or a double vector expected.\n"), fname, iVar);
|
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: A 16-bit unsigned integer or a double vector expected.\n"), fname, iVar);
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
sciErr = getMatrixOfUnsignedInteger16(pvApiCtx, piAddrVar, iRows, iCols, pusValue);
|
sciErr = getMatrixOfUnsignedInteger16(pvApiCtx, piAddrVar, iRows, iCols, pusValue);
|
||||||
if (sciErr.iErr)
|
if (sciErr.iErr) {
|
||||||
{
|
|
||||||
printError(&sciErr, 0);
|
printError(&sciErr, 0);
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: A 16-bit unsigned integer or a double vector expected.\n"), fname, iVar);
|
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: A 16-bit unsigned integer or a double vector expected.\n"), fname, iVar);
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
}
|
}
|
||||||
|
|
@ -184,8 +177,7 @@ SWIG_SciUint16_FromUnsignedShortArrayAndSize(void *pvApiCtx, int iVarOut, int iR
|
||||||
pdValues[i] = pusValues[i];
|
pdValues[i] = pusValues[i];
|
||||||
|
|
||||||
sciErr = createMatrixOfDouble(pvApiCtx, SWIG_NbInputArgument(pvApiCtx) + iVarOut, iRows, iCols, pdValues);
|
sciErr = createMatrixOfDouble(pvApiCtx, SWIG_NbInputArgument(pvApiCtx) + iVarOut, iRows, iCols, pdValues);
|
||||||
if (sciErr.iErr)
|
if (sciErr.iErr) {
|
||||||
{
|
|
||||||
printError(&sciErr, 0);
|
printError(&sciErr, 0);
|
||||||
free(pdValues);
|
free(pdValues);
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue