scilab: use macro SWIG_NbInputArgument() instead of Rhs()
This commit is contained in:
parent
a6f824a9a8
commit
30f4336f59
8 changed files with 21 additions and 21 deletions
|
|
@ -41,7 +41,7 @@ SWIG_AsVal_dec(bool)(SwigSciObject _iVar, bool *_pbValue) {
|
|||
SWIGINTERN int
|
||||
SWIG_From_dec(bool)(bool _bValue) {
|
||||
int iRet = 0;
|
||||
int iVarOut = Rhs + SWIG_Scilab_GetOutputPosition();
|
||||
int iVarOut = SWIG_NbInputArgument(_pvApiCtx) + SWIG_Scilab_GetOutputPosition();
|
||||
|
||||
iRet = createScalarBoolean(pvApiCtx, iVarOut, _bValue);
|
||||
if (iRet) {
|
||||
|
|
@ -88,12 +88,12 @@ SWIGINTERN int
|
|||
SWIG_SciBoolean_FromIntArrayAndSize(void *_pvApiCtx, int _iVarOut, int _iRows, int _iCols, const int *_piData) {
|
||||
SciErr sciErr;
|
||||
|
||||
sciErr = createMatrixOfBoolean(_pvApiCtx, Rhs + _iVarOut, _iRows, _iCols, _piData);
|
||||
sciErr = createMatrixOfBoolean(_pvApiCtx, SWIG_NbInputArgument(_pvApiCtx) + _iVarOut, _iRows, _iCols, _piData);
|
||||
if(sciErr.iErr) {
|
||||
printError(&sciErr, 0);
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
|
||||
return Rhs + _iVarOut;
|
||||
return SWIG_NbInputArgument(_pvApiCtx) + _iVarOut;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@ SwigScilabStringFromCharPtr(void *_pvApiCtx, int _iVarOut, const char *_pchValue
|
|||
pstData = (char **)malloc(sizeof(char *));
|
||||
pstData[0] = strdup(_pchValue);
|
||||
|
||||
sciErr = createMatrixOfString(_pvApiCtx, Rhs + _iVarOut, 1, 1, (char **)pstData);
|
||||
sciErr = createMatrixOfString(_pvApiCtx, SWIG_NbInputArgument(_pvApiCtx) + _iVarOut, 1, 1, (char **)pstData);
|
||||
if (sciErr.iErr) {
|
||||
printError(&sciErr, 0);
|
||||
return SWIG_ERROR;
|
||||
|
|
@ -169,7 +169,7 @@ SwigScilabStringFromCharPtr(void *_pvApiCtx, int _iVarOut, const char *_pchValue
|
|||
|
||||
free(pstData[0]);
|
||||
|
||||
return Rhs + _iVarOut;
|
||||
return SWIG_NbInputArgument(_pvApiCtx) + _iVarOut;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ SWIG_AsVal_dec(double)(SwigSciObject _iVar, double *_pdblValue) {
|
|||
SWIGINTERN int
|
||||
SWIG_From_dec(double)(double _dblValue) {
|
||||
int iRet;
|
||||
int iVarOut = Rhs + SWIG_Scilab_GetOutputPosition();
|
||||
int iVarOut = SWIG_NbInputArgument(_pvApiCtx) + SWIG_Scilab_GetOutputPosition();
|
||||
iRet = createScalarDouble(pvApiCtx, iVarOut, _dblValue);
|
||||
if (iRet) {
|
||||
return SWIG_ERROR;
|
||||
|
|
@ -109,13 +109,13 @@ SWIGINTERN int
|
|||
SWIG_SciDouble_FromDoubleArrayAndSize(void *_pvApiCtx, int _iVarOut, int _iRows, int _iCols, double *_pdblValue) {
|
||||
SciErr sciErr;
|
||||
|
||||
sciErr = createMatrixOfDouble(_pvApiCtx, Rhs + _iVarOut, _iRows, _iCols, _pdblValue);
|
||||
sciErr = createMatrixOfDouble(_pvApiCtx, SWIG_NbInputArgument(_pvApiCtx) + _iVarOut, _iRows, _iCols, _pdblValue);
|
||||
if (sciErr.iErr) {
|
||||
printError(&sciErr, 0);
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
|
||||
return Rhs + _iVarOut;
|
||||
return SWIG_NbInputArgument(_pvApiCtx) + _iVarOut;
|
||||
}
|
||||
}
|
||||
%fragment(SWIG_CreateScilabVariable_frag(double), "wrapper") {
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ SWIG_From_dec(float)(float _flValue) {
|
|||
double dblDoubleValue = (double) _flValue;
|
||||
int iRowsOut = 1;
|
||||
int iColsOut = 1;
|
||||
int iVarOut = Rhs + SWIG_Scilab_GetOutputPosition();
|
||||
int iVarOut = SWIG_NbInputArgument(_pvApiCtx) + SWIG_Scilab_GetOutputPosition();
|
||||
|
||||
sciErr = createMatrixOfDouble(pvApiCtx, iVarOut, iRowsOut, iColsOut, &dblDoubleValue);
|
||||
if (sciErr.iErr) {
|
||||
|
|
|
|||
|
|
@ -200,13 +200,13 @@ SWIGINTERN int
|
|||
SWIG_SciInt32_FromIntArrayAndSize(void *_pvApiCtx, int _iVarOut, int _iRows, int _iCols, const int *_piData) {
|
||||
SciErr sciErr;
|
||||
|
||||
sciErr = createMatrixOfInteger32(_pvApiCtx, Rhs + _iVarOut, _iRows, _iCols, _piData);
|
||||
sciErr = createMatrixOfInteger32(_pvApiCtx, SWIG_NbInputArgument(_pvApiCtx) + _iVarOut, _iRows, _iCols, _piData);
|
||||
if(sciErr.iErr) {
|
||||
printError(&sciErr, 0);
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
|
||||
return Rhs + _iVarOut;
|
||||
return SWIG_NbInputArgument(_pvApiCtx) + _iVarOut;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -132,13 +132,13 @@ SWIGRUNTIMEINLINE int
|
|||
SwigScilabPtrFromObject(void *_pvApiCtx, int _iVarOut, void *_object, swig_type_info *_descriptor, int _flags) {
|
||||
SciErr sciErr;
|
||||
|
||||
sciErr = createPointer(pvApiCtx, Rhs + _iVarOut, (void *)_object);
|
||||
sciErr = createPointer(pvApiCtx, SWIG_NbInputArgument(_pvApiCtx) + _iVarOut, (void *)_object);
|
||||
if (sciErr.iErr) {
|
||||
printError(&sciErr, 0);
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
|
||||
return Rhs + _iVarOut;
|
||||
return SWIG_NbInputArgument(_pvApiCtx) + _iVarOut;
|
||||
}
|
||||
|
||||
SWIGRUNTIME int
|
||||
|
|
|
|||
|
|
@ -68,13 +68,13 @@ SwigScilabInt8FromSignedChar(void *_pvApiCtx, int _iVarOut, signed char _scValue
|
|||
int iRowsOut = 1;
|
||||
int iColsOut = 1;
|
||||
|
||||
sciErr = createMatrixOfInteger8(pvApiCtx, Rhs + _iVarOut, iRowsOut, iColsOut, (char *)&_scValue);
|
||||
sciErr = createMatrixOfInteger8(pvApiCtx, SWIG_NbInputArgument(_pvApiCtx) + _iVarOut, iRowsOut, iColsOut, (char *)&_scValue);
|
||||
if (sciErr.iErr) {
|
||||
printError(&sciErr, 0);
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
|
||||
return Rhs + _iVarOut;
|
||||
return SWIG_NbInputArgument(_pvApiCtx) + _iVarOut;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -130,12 +130,12 @@ SWIGINTERN int
|
|||
SWIG_SciInt8_FromSignedCharArrayAndSize(void *_pvApiCtx, int _iVarOut, int _iRows, int _iCols, const signed char *_pscValue) {
|
||||
SciErr sciErr;
|
||||
|
||||
sciErr = createMatrixOfInteger8(pvApiCtx, Rhs + _iVarOut, _iRows, _iCols, (const char *)_pscValue);
|
||||
sciErr = createMatrixOfInteger8(pvApiCtx, SWIG_NbInputArgument(_pvApiCtx) + _iVarOut, _iRows, _iCols, (const char *)_pscValue);
|
||||
if (sciErr.iErr) {
|
||||
printError(&sciErr, 0);
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
|
||||
return Rhs + _iVarOut;
|
||||
return SWIG_NbInputArgument(_pvApiCtx) + _iVarOut;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -68,13 +68,13 @@ SWIG_SciUint8_FromUnsignedChar(void *_pvApiCtx, int _iVarOut, unsigned char _ucV
|
|||
int iRowsOut = 1;
|
||||
int iColsOut = 1;
|
||||
|
||||
sciErr = createMatrixOfUnsignedInteger8(pvApiCtx, Rhs + _iVarOut, iRowsOut, iColsOut, &_ucValue);
|
||||
sciErr = createMatrixOfUnsignedInteger8(pvApiCtx, SWIG_NbInputArgument(_pvApiCtx) + _iVarOut, iRowsOut, iColsOut, &_ucValue);
|
||||
if (sciErr.iErr) {
|
||||
printError(&sciErr, 0);
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
|
||||
return Rhs + _iVarOut;
|
||||
return SWIG_NbInputArgument(_pvApiCtx) + _iVarOut;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -130,12 +130,12 @@ SWIGINTERN int
|
|||
SWIG_SciUint8_FromUnsignedCharArrayAndSize(void *_pvApiCtx, int _iVarOut, int _iRows, int _iCols, const unsigned char *_puscValue) {
|
||||
SciErr sciErr;
|
||||
|
||||
sciErr = createMatrixOfUnsignedInteger8(pvApiCtx, Rhs + _iVarOut, _iRows, _iCols, _puscValue);
|
||||
sciErr = createMatrixOfUnsignedInteger8(pvApiCtx, SWIG_NbInputArgument(_pvApiCtx) + _iVarOut, _iRows, _iCols, _puscValue);
|
||||
if (sciErr.iErr) {
|
||||
printError(&sciErr, 0);
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
|
||||
return Rhs + _iVarOut;
|
||||
return SWIG_NbInputArgument(_pvApiCtx) + _iVarOut;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue