summaryrefslogtreecommitdiffstats
path: root/scilab/modules/matio
diff options
context:
space:
mode:
authorClément David <clement.david@esi-group.com>2021-07-15 15:50:48 +0200
committerClément David <clement.david@esi-group.com>2021-07-15 15:50:48 +0200
commit81a9cc049332de0c712cf56da585fcd25c8e59e3 (patch)
treef365c25a05c1782a16b2985bf7481116c106952d /scilab/modules/matio
parentb0937f19e4b8ddf416ca9a9a433bcbbd3f4ef2c0 (diff)
parent90b4ecb9b57ac6ad4e00d4a99b0d8bd1a6424403 (diff)
downloadscilab-master.zip
scilab-master.tar.gz
Merge remote-tracking branch 'origin/6.1'HEADmaster
Change-Id: I5d26fc380a28efe0bb6d0096fe9684b274b55bfe
Diffstat (limited to 'scilab/modules/matio')
-rw-r--r--scilab/modules/matio/Makefile.in2
-rw-r--r--scilab/modules/matio/src/cpp/GetSparseVariable.cpp12
2 files changed, 12 insertions, 2 deletions
diff --git a/scilab/modules/matio/Makefile.in b/scilab/modules/matio/Makefile.in
index fdc025e..9876a21e 100644
--- a/scilab/modules/matio/Makefile.in
+++ b/scilab/modules/matio/Makefile.in
@@ -498,9 +498,11 @@ NMEDIT = @NMEDIT@
498OBJDUMP = @OBJDUMP@ 498OBJDUMP = @OBJDUMP@
499OBJEXT = @OBJEXT@ 499OBJEXT = @OBJEXT@
500OCAMLC = @OCAMLC@ 500OCAMLC = @OCAMLC@
501OCAMLCFLAGS = @OCAMLCFLAGS@
501OCAMLDEP = @OCAMLDEP@ 502OCAMLDEP = @OCAMLDEP@
502OCAMLLEX = @OCAMLLEX@ 503OCAMLLEX = @OCAMLLEX@
503OCAMLOPT = @OCAMLOPT@ 504OCAMLOPT = @OCAMLOPT@
505OCAMLOPTFLAGS = @OCAMLOPTFLAGS@
504OCAMLYACC = @OCAMLYACC@ 506OCAMLYACC = @OCAMLYACC@
505OPENMPI_CC = @OPENMPI_CC@ 507OPENMPI_CC = @OPENMPI_CC@
506OPENMPI_CFLAGS = @OPENMPI_CFLAGS@ 508OPENMPI_CFLAGS = @OPENMPI_CFLAGS@
diff --git a/scilab/modules/matio/src/cpp/GetSparseVariable.cpp b/scilab/modules/matio/src/cpp/GetSparseVariable.cpp
index a867d5b..cf4b6ee 100644
--- a/scilab/modules/matio/src/cpp/GetSparseVariable.cpp
+++ b/scilab/modules/matio/src/cpp/GetSparseVariable.cpp
@@ -65,7 +65,11 @@ matvar_t* GetSparseMatVar(types::Sparse* pSparse, const char *name)
65 int* itemsRow = new int[pSparse->getRows()]; 65 int* itemsRow = new int[pSparse->getRows()];
66 pSparse->getNbItemByRow(itemsRow); 66 pSparse->getNbItemByRow(itemsRow);
67 67
68 int* colIndexes = (int*)MALLOC(sizeof(int) * (pSparse->getRows() + 1)); 68#if MATIO_RELEASE_LEVEL < 18
69 mat_int32_t* colIndexes = (mat_int32_t*)MALLOC(sizeof(mat_int32_t) * (pSparse->getRows() + 1));
70#else
71 mat_uint32_t* colIndexes = (mat_uint32_t*)MALLOC(sizeof(mat_uint32_t) * (pSparse->getRows() + 1));
72#endif
69 if (colIndexes == NULL) 73 if (colIndexes == NULL)
70 { 74 {
71 FREE(sparseData); 75 FREE(sparseData);
@@ -82,7 +86,11 @@ matvar_t* GetSparseMatVar(types::Sparse* pSparse, const char *name)
82 colIndexes[K + 1] = colIndexes[K] + itemsRow[K]; 86 colIndexes[K + 1] = colIndexes[K] + itemsRow[K];
83 } 87 }
84 88
85 int* rowIndexes = (int*)MALLOC(sizeof(int) * nonZeros); 89#if MATIO_RELEASE_LEVEL < 18
90 mat_int32_t* rowIndexes = (mat_int32_t*)MALLOC(sizeof(mat_int32_t) * nonZeros);
91#else
92 mat_uint32_t* rowIndexes = (mat_uint32_t*)MALLOC(sizeof(mat_uint32_t) * nonZeros);
93#endif
86 if (rowIndexes == NULL) 94 if (rowIndexes == NULL)
87 { 95 {
88 FREE(sparseData); 96 FREE(sparseData);