diff --git a/Lib/scilab/scimatrixbool.swg b/Lib/scilab/scimatrixbool.swg index e607bceca..3b1f8cb77 100644 --- a/Lib/scilab/scimatrixbool.swg +++ b/Lib/scilab/scimatrixbool.swg @@ -25,10 +25,8 @@ // in (bool *IN, int IN_SIZE) -%typemap(in, noblock=1, fragment="SWIG_SciBoolean_AsBoolArrayAndSize") (bool *IN, int IN_SIZE) +%typemap(in, noblock=1, fragment="SWIG_SciBoolean_AsBoolArrayAndSize") (bool *IN, int IN_SIZE) (int rowCount, int colCount) { - int rowCount; - int colCount; if (SWIG_SciBoolean_AsBoolArrayAndSize(pvApiCtx, $input, &rowCount, &colCount, &$1, fname) == SWIG_OK) { $2 = rowCount * colCount; } @@ -39,10 +37,8 @@ // in (int IN_SIZE, bool *IN) -%typemap(in, noblock=1) (int IN_SIZE, bool *IN) +%typemap(in, noblock=1) (int IN_SIZE, bool *IN) (int rowCount, int colCount) { - int rowCount; - int colCount; if (SWIG_SciBoolean_AsBoolArrayAndSize(pvApiCtx, $input, &rowCount, &colCount, &$2, fname) == SWIG_OK) { $1 = rowCount * colCount; } diff --git a/Lib/scilab/scimatrixchar.swg b/Lib/scilab/scimatrixchar.swg index f86733ed3..37f683396 100644 --- a/Lib/scilab/scimatrixchar.swg +++ b/Lib/scilab/scimatrixchar.swg @@ -18,17 +18,15 @@ %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; } } // in (char **IN, int IN_SIZE) -%typemap(in, noblock=1, fragment="SWIG_SciString_AsCharPtrArrayAndSize") (char **IN, int IN_SIZE) +%typemap(in, noblock=1, fragment="SWIG_SciString_AsCharPtrArrayAndSize") (char **IN, int IN_SIZE) (int rowCount, int colCount) { - int rowCount; - int colCount; if (SWIG_SciString_AsCharPtrArrayAndSize(pvApiCtx, $input, &rowCount, &colCount, &$1, fname) == SWIG_OK) { $2 = rowCount * colCount; } @@ -39,10 +37,8 @@ // in (int IN_SIZE, char **IN) -%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) (int rowCount, int colCount) { - int rowCount; - int colCount; if (SWIG_SciString_AsCharPtrArrayAndSize(pvApiCtx, $input, &rowCount, &colCount, &$2, fname) == SWIG_OK) { $1 = rowCount * colCount; } diff --git a/Lib/scilab/scimatrixdouble.swg b/Lib/scilab/scimatrixdouble.swg index 8da9ae729..b8272e9a6 100644 --- a/Lib/scilab/scimatrixdouble.swg +++ b/Lib/scilab/scimatrixdouble.swg @@ -25,10 +25,8 @@ // in (double *IN, int IN_SIZE) -%typemap(in, noblock=1, fragment="SWIG_SciDouble_AsDoubleArrayAndSize") (double *IN, int IN_SIZE) +%typemap(in, noblock=1, fragment="SWIG_SciDouble_AsDoubleArrayAndSize") (double *IN, int IN_SIZE) (int rowCount, int colCount) { - int rowCount; - int colCount; if (SWIG_SciDouble_AsDoubleArrayAndSize(pvApiCtx, $input, &rowCount, &colCount, &$1, fname) == SWIG_OK) { $2 = rowCount * colCount; } @@ -39,10 +37,8 @@ // in (int IN_SIZE, double *IN) -%typemap(in, noblock=1, fragment="SWIG_SciDouble_AsDoubleArrayAndSize") (int IN_SIZE, double *IN) +%typemap(in, noblock=1, fragment="SWIG_SciDouble_AsDoubleArrayAndSize") (int IN_SIZE, double *IN) (int rowCount, int colCount) { - int rowCount; - int colCount; if (SWIG_SciDouble_AsDoubleArrayAndSize(pvApiCtx, $input, &rowCount, &colCount, &$2, fname) == SWIG_OK) { $1 = rowCount * colCount; } diff --git a/Lib/scilab/scimatrixint.swg b/Lib/scilab/scimatrixint.swg index 5b94fea2e..b7270d5d5 100644 --- a/Lib/scilab/scimatrixint.swg +++ b/Lib/scilab/scimatrixint.swg @@ -27,10 +27,8 @@ // in (int *IN, int IN_SIZE) -%typemap(in, noblock=1, fragment="SWIG_SciDoubleOrInt32_AsIntArrayAndSize") (int *IN, int IN_SIZE) +%typemap(in, noblock=1, fragment="SWIG_SciDoubleOrInt32_AsIntArrayAndSize") (int *IN, int IN_SIZE) (int rowCount, int colCount) { - int rowCount; - int colCount; if (SWIG_SciDoubleOrInt32_AsIntArrayAndSize(pvApiCtx, $input, &rowCount, &colCount, &$1, fname) == SWIG_OK) { $2 = rowCount * colCount; } @@ -42,10 +40,8 @@ // in (int IN_SIZE, int *IN) -%typemap(in, noblock=1, fragment="SWIG_SciDoubleOrInt32_AsIntArrayAndSize") (int IN_SIZE, int *IN) +%typemap(in, noblock=1, fragment="SWIG_SciDoubleOrInt32_AsIntArrayAndSize") (int IN_SIZE, int *IN) (int rowCount, int colCount) { - int rowCount; - int colCount; if (SWIG_SciDoubleOrInt32_AsIntArrayAndSize(pvApiCtx, $input, &rowCount, &colCount, &$2, fname) == SWIG_OK) { $1 = rowCount * colCount; } diff --git a/Lib/scilab/scirun.swg b/Lib/scilab/scirun.swg index dc7ad26af..1910facf2 100644 --- a/Lib/scilab/scirun.swg +++ b/Lib/scilab/scirun.swg @@ -249,7 +249,7 @@ SWIG_Scilab_Error(int code, const char *msg) #define SWIG_fail return SWIG_ERROR; -SWIGRUNTIME int +SWIGRUNTIME void SWIG_Scilab_Raise_Ex(const char *obj, const char *type, swig_type_info *descriptor) { if (type) { if (obj) @@ -259,7 +259,7 @@ SWIG_Scilab_Raise_Ex(const char *obj, const char *type, swig_type_info *descript } } -SWIGRUNTIME int +SWIGRUNTIME void SWIG_Scilab_Raise(const int obj, const char *type, swig_type_info *descriptor) { Scierror(SWIG_SCILAB_ERROR, "SWIG/Scilab: Exception (%s) occured.\n", type); } diff --git a/Lib/scilab/typemaps.i b/Lib/scilab/typemaps.i index 498c477c2..9d7138743 100644 --- a/Lib/scilab/typemaps.i +++ b/Lib/scilab/typemaps.i @@ -5,10 +5,10 @@ // INPUT typemaps %define %scilab_input_typemap(Type) -%typemap(in, noblock=1, fragment=SWIG_AsVal_frag(Type)) Type *INPUT(Type temp), Type &INPUT(Type temp) { - int ecode$argnum = SWIG_AsVal_dec(Type)($input, &temp); - if (!SWIG_IsOK(ecode$argnum)) { - %argument_fail(ecode$argnum, "$type", $symname, $argnum); +%typemap(in, noblock=1, fragment=SWIG_AsVal_frag(Type)) Type *INPUT(Type temp)(int ecode), Type &INPUT(Type temp)(int ecode) { + ecode = SWIG_AsVal_dec(Type)($input, &temp); + if (!SWIG_IsOK(ecode)) { + %argument_fail(ecode, "$type", $symname, $argnum); } $1 = &temp; } diff --git a/Lib/typemaps/strings.swg b/Lib/typemaps/strings.swg index 6bac0b98a..87e97dd74 100644 --- a/Lib/typemaps/strings.swg +++ b/Lib/typemaps/strings.swg @@ -300,7 +300,7 @@ /* varout */ -%typemap(varout,noblock=1,fragment=#SWIG_CharBufLen) +%typemap(varout,fragment=#SWIG_CharBufLen) Char [ANY], const Char [ANY] { %#ifndef SWIG_PRESERVE_CARRAY_SIZE size_t size = SWIG_CharBufLen($1, $1_dim0);