diff options
Diffstat (limited to 'Lib/scilab/scimatrixint.swg')
-rw-r--r-- | Lib/scilab/scimatrixint.swg | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Lib/scilab/scimatrixint.swg b/Lib/scilab/scimatrixint.swg index e304d4f64..057710725 100644 --- a/Lib/scilab/scimatrixint.swg +++ b/Lib/scilab/scimatrixint.swg @@ -30,7 +30,11 @@ %typemap(in, noblock=1, fragment="SWIG_SciDoubleOrInt32_AsIntArrayAndSize") (int *IN, int IN_SIZE) (int rowCount, int colCount) { if (SWIG_SciDoubleOrInt32_AsIntArrayAndSize(pvApiCtx, $input, &rowCount, &colCount, &$1, fname) == SWIG_OK) { - $2 = rowCount * colCount; + if (rowCount < 0) { + $2 = rowCount; + } else { + $2 = rowCount * colCount; + } } else { return SWIG_ERROR; @@ -43,7 +47,11 @@ %typemap(in, noblock=1, fragment="SWIG_SciDoubleOrInt32_AsIntArrayAndSize") (int IN_SIZE, int *IN) (int rowCount, int colCount) { if (SWIG_SciDoubleOrInt32_AsIntArrayAndSize(pvApiCtx, $input, &rowCount, &colCount, &$2, fname) == SWIG_OK) { - $1 = rowCount * colCount; + if (rowCount < 0) { + $1 = rowCount; + } else { + $1 = rowCount * colCount; + } } else { return SWIG_ERROR; |