summaryrefslogtreecommitdiffstats
path: root/scilab/modules/api_scilab
diff options
context:
space:
mode:
authorantoine ELIAS <antoine.elias@scilab.org>2010-01-26 10:23:43 +0100
committerantoine ELIAS <antoine.elias@scilab.org>2010-01-26 10:23:43 +0100
commitc7315658addcb4e616ef148e66a1cca3b858bca4 (patch)
treef131017b3108bb108f4c8d68f61de354f68b710c /scilab/modules/api_scilab
parent1b0c5cd1e853b75b5a6a0d80c3702aa3846dffd3 (diff)
downloadscilab-c7315658addcb4e616ef148e66a1cca3b858bca4.zip
scilab-c7315658addcb4e616ef148e66a1cca3b858bca4.tar.gz
API fixes
Diffstat (limited to 'scilab/modules/api_scilab')
-rw-r--r--scilab/modules/api_scilab/src/cpp/api_poly.cpp8
-rw-r--r--scilab/modules/api_scilab/src/cpp/api_sparse.cpp8
2 files changed, 8 insertions, 8 deletions
diff --git a/scilab/modules/api_scilab/src/cpp/api_poly.cpp b/scilab/modules/api_scilab/src/cpp/api_poly.cpp
index f12e4d8..3f2d5c1 100644
--- a/scilab/modules/api_scilab/src/cpp/api_poly.cpp
+++ b/scilab/modules/api_scilab/src/cpp/api_poly.cpp
@@ -479,7 +479,7 @@ static int getCommonAllocatedMatrixOfPoly(void* _pvCtx, int* _piAddress, int _iC
479 *_pdblReal = (double**)MALLOC(sizeof(double*) * *_piRows * *_piCols); 479 *_pdblReal = (double**)MALLOC(sizeof(double*) * *_piRows * *_piCols);
480 for(int i = 0 ; i < *_piRows * *_piCols ; i++) 480 for(int i = 0 ; i < *_piRows * *_piCols ; i++)
481 { 481 {
482 (*_pdblReal)[i] = (double*)MALLOC(sizeof(double) * *_piNbCoef[i]); 482 (*_pdblReal)[i] = (double*)MALLOC(sizeof(double) * (*_piNbCoef)[i]);
483 } 483 }
484 484
485 if(_iComplex) 485 if(_iComplex)
@@ -487,7 +487,7 @@ static int getCommonAllocatedMatrixOfPoly(void* _pvCtx, int* _piAddress, int _iC
487 *_pdblImg = (double**)MALLOC(sizeof(double*) * *_piRows * *_piCols); 487 *_pdblImg = (double**)MALLOC(sizeof(double*) * *_piRows * *_piCols);
488 for(int i = 0 ; i < *_piRows * *_piCols ; i++) 488 for(int i = 0 ; i < *_piRows * *_piCols ; i++)
489 { 489 {
490 (*_pdblImg)[i] = (double*)MALLOC(sizeof(double) * *_piNbCoef[i]); 490 (*_pdblImg)[i] = (double*)MALLOC(sizeof(double) * (*_piNbCoef)[i]);
491 } 491 }
492 } 492 }
493 493
@@ -543,7 +543,7 @@ static int getCommonAllocatedNamedMatrixOfPoly(void* _pvCtx, char* _pstName, int
543 *_pdblReal = (double**)MALLOC(sizeof(double*) * *_piRows * *_piCols); 543 *_pdblReal = (double**)MALLOC(sizeof(double*) * *_piRows * *_piCols);
544 for(int i = 0 ; i < *_piRows * *_piCols ; i++) 544 for(int i = 0 ; i < *_piRows * *_piCols ; i++)
545 { 545 {
546 (*_pdblReal)[i] = (double*)MALLOC(sizeof(double) * *_piNbCoef[i]); 546 (*_pdblReal)[i] = (double*)MALLOC(sizeof(double) * (*_piNbCoef)[i]);
547 } 547 }
548 548
549 if(_iComplex) 549 if(_iComplex)
@@ -551,7 +551,7 @@ static int getCommonAllocatedNamedMatrixOfPoly(void* _pvCtx, char* _pstName, int
551 *_pdblImg = (double**)MALLOC(sizeof(double*) * *_piRows * *_piCols); 551 *_pdblImg = (double**)MALLOC(sizeof(double*) * *_piRows * *_piCols);
552 for(int i = 0 ; i < *_piRows * *_piCols ; i++) 552 for(int i = 0 ; i < *_piRows * *_piCols ; i++)
553 { 553 {
554 (*_pdblImg)[i] = (double*)MALLOC(sizeof(double) * *_piNbCoef[i]); 554 (*_pdblImg)[i] = (double*)MALLOC(sizeof(double) * (*_piNbCoef)[i]);
555 } 555 }
556 } 556 }
557 557
diff --git a/scilab/modules/api_scilab/src/cpp/api_sparse.cpp b/scilab/modules/api_scilab/src/cpp/api_sparse.cpp
index 374fce9..e587652 100644
--- a/scilab/modules/api_scilab/src/cpp/api_sparse.cpp
+++ b/scilab/modules/api_scilab/src/cpp/api_sparse.cpp
@@ -398,18 +398,18 @@ static int getCommonAllocatedSparseMatrix(void* _pvCtx, int* _piAddress, int _iC
398 } 398 }
399 399
400 *_piNbItemRow = (int*)MALLOC(sizeof(int) * *_piRows); 400 *_piNbItemRow = (int*)MALLOC(sizeof(int) * *_piRows);
401 memcpy(_piNbItemRow, piNbItemRow, sizeof(int) * *_piRows); 401 memcpy(*_piNbItemRow, piNbItemRow, sizeof(int) * *_piRows);
402 402
403 *_piColPos = (int*)MALLOC(sizeof(int) * *_piNbItem); 403 *_piColPos = (int*)MALLOC(sizeof(int) * *_piNbItem);
404 memcpy(_piColPos, piColPos, sizeof(int) * *_piNbItem); 404 memcpy(*_piColPos, piColPos, sizeof(int) * *_piNbItem);
405 405
406 *_pdblReal = (double*)MALLOC(sizeof(double) * *_piNbItem); 406 *_pdblReal = (double*)MALLOC(sizeof(double) * *_piNbItem);
407 memcpy(_pdblReal, pdblReal, sizeof(double) * *_piNbItem); 407 memcpy(*_pdblReal, pdblReal, sizeof(double) * *_piNbItem);
408 408
409 if(_iComplex) 409 if(_iComplex)
410 { 410 {
411 *_pdblImg = (double*)MALLOC(sizeof(double) * *_piNbItem); 411 *_pdblImg = (double*)MALLOC(sizeof(double) * *_piNbItem);
412 memcpy(_pdblImg, pdblImg, sizeof(double) * *_piNbItem); 412 memcpy(*_pdblImg, pdblImg, sizeof(double) * *_piNbItem);
413 } 413 }
414 414
415 return 0; 415 return 0;