summaryrefslogtreecommitdiffstats
path: root/scilab/modules/javasci
diff options
context:
space:
mode:
authorantoine ELIAS <antoine.elias@scilab.org>2009-10-06 18:28:27 +0200
committerantoine ELIAS <antoine.elias@scilab.org>2009-10-06 18:28:27 +0200
commit0c18e3b83d8f669185bdb9a4f06892db2ff99c46 (patch)
tree8be5f1d0d12bf4211ab6e41f6624d30252d58974 /scilab/modules/javasci
parent7336cc32155f38ec2dedc897b76562bf69b24f08 (diff)
downloadscilab-0c18e3b83d8f669185bdb9a4f06892db2ff99c46.zip
scilab-0c18e3b83d8f669185bdb9a4f06892db2ff99c46.tar.gz
add Scilab context parameter in API functions
Diffstat (limited to 'scilab/modules/javasci')
-rw-r--r--scilab/modules/javasci/src/c/javasci_SciAbstractArray.c28
-rw-r--r--scilab/modules/javasci/src/c/javasci_SciBooleanArray.c4
-rw-r--r--scilab/modules/javasci/src/c/javasci_SciComplexArray.c8
-rw-r--r--scilab/modules/javasci/src/c/javasci_SciDoubleArray.c4
-rw-r--r--scilab/modules/javasci/src/c/javasci_SciIntegerArray.c4
-rw-r--r--scilab/modules/javasci/src/c/javasci_SciStringArray.c6
-rw-r--r--scilab/modules/javasci/src/c/javasci_Scilab.c4
-rw-r--r--scilab/modules/javasci/src/c/javasci_Scilab2.c26
8 files changed, 42 insertions, 42 deletions
diff --git a/scilab/modules/javasci/src/c/javasci_SciAbstractArray.c b/scilab/modules/javasci/src/c/javasci_SciAbstractArray.c
index a355285..451b161 100644
--- a/scilab/modules/javasci/src/c/javasci_SciAbstractArray.c
+++ b/scilab/modules/javasci/src/c/javasci_SciAbstractArray.c
@@ -59,7 +59,7 @@ JNIEXPORT jint JNICALL Java_javasci_SciAbstractArray_getNumberOfRowsFromScilab(J
59 59
60 cname = (*env)->GetStringUTFChars(env, name, NULL); 60 cname = (*env)->GetStringUTFChars(env, name, NULL);
61 61
62 strErr = getNamedVarDimension((char*)cname, &dimension[0], &dimension[1]); 62 strErr = getNamedVarDimension(pvApiCtx, (char*)cname, &dimension[0], &dimension[1]);
63 if(strErr.iErr) 63 if(strErr.iErr)
64 { 64 {
65 fprintf(stderr,"%s", getErrorMessage(strErr)); 65 fprintf(stderr,"%s", getErrorMessage(strErr));
@@ -89,7 +89,7 @@ JNIEXPORT jint JNICALL Java_javasci_SciAbstractArray_getNumberOfColsFromScilab(J
89 89
90 cname = (*env)->GetStringUTFChars(env, name, NULL); 90 cname = (*env)->GetStringUTFChars(env, name, NULL);
91 91
92 strErr = getNamedVarDimension((char*)cname, &dimension[0], &dimension[1]); 92 strErr = getNamedVarDimension(pvApiCtx, (char*)cname, &dimension[0], &dimension[1]);
93 if(strErr.iErr) 93 if(strErr.iErr)
94 { 94 {
95 fprintf(stderr,"%s", getErrorMessage(strErr)); 95 fprintf(stderr,"%s", getErrorMessage(strErr));
@@ -160,7 +160,7 @@ JNIEXPORT void JNICALL Java_javasci_SciAbstractArray_Get(JNIEnv *env, jobject ob
160 160
161 int dimension[2]; 161 int dimension[2];
162 162
163 strErr = getNamedVarDimension((char*)cname, &dimension[0], &dimension[1]); 163 strErr = getNamedVarDimension(pvApiCtx, (char*)cname, &dimension[0], &dimension[1]);
164 if(strErr.iErr) 164 if(strErr.iErr)
165 { 165 {
166 fprintf(stderr,"%s", getErrorMessage(strErr)); 166 fprintf(stderr,"%s", getErrorMessage(strErr));
@@ -309,7 +309,7 @@ static int JNI_getMatrixOfInteger(JNIEnv *env, jobject obj_this, jclass class_th
309 309
310 for (i = 0; i < (Rows * Cols); i++) icx[i] = (int)cx[i]; 310 for (i = 0; i < (Rows * Cols); i++) icx[i] = (int)cx[i];
311 311
312 strErr = readNamedMatrixOfInteger32(name, &cm, &cn, icx); 312 strErr = readNamedMatrixOfInteger32(pvApiCtx, name, &cm, &cn, icx);
313 if(strErr.iErr) 313 if(strErr.iErr)
314 { 314 {
315 fprintf(stderr,"%s", getErrorMessage(strErr)); 315 fprintf(stderr,"%s", getErrorMessage(strErr));
@@ -333,7 +333,7 @@ static int JNI_getMatrixOfDouble(JNIEnv *env, jobject obj_this, jclass class_thi
333 jdoubleArray jx = (*env)->GetObjectField(env, obj_this, id_x); 333 jdoubleArray jx = (*env)->GetObjectField(env, obj_this, id_x);
334 double *cx = (*env)->GetDoubleArrayElements(env, jx, NULL); 334 double *cx = (*env)->GetDoubleArrayElements(env, jx, NULL);
335 335
336 strErr = readNamedMatrixOfDouble(name, &cm, &cn, cx); 336 strErr = readNamedMatrixOfDouble(pvApiCtx, name, &cm, &cn, cx);
337 if(strErr.iErr) 337 if(strErr.iErr)
338 { 338 {
339 fprintf(stderr,"%s", getErrorMessage(strErr)); 339 fprintf(stderr,"%s", getErrorMessage(strErr));
@@ -360,7 +360,7 @@ static int JNI_getMatrixOfComplex(JNIEnv *env, jobject obj_this, jclass class_th
360 double *cx = (*env)->GetDoubleArrayElements(env, jx, NULL); 360 double *cx = (*env)->GetDoubleArrayElements(env, jx, NULL);
361 double *cy = (*env)->GetDoubleArrayElements(env, jy, NULL); 361 double *cy = (*env)->GetDoubleArrayElements(env, jy, NULL);
362 362
363 strErr = readNamedComplexMatrixOfDouble(name, &cm, &cn, cx, cy); 363 strErr = readNamedComplexMatrixOfDouble(pvApiCtx, name, &cm, &cn, cx, cy);
364 if(strErr.iErr) 364 if(strErr.iErr)
365 { 365 {
366 fprintf(stderr,"%s", getErrorMessage(strErr)); 366 fprintf(stderr,"%s", getErrorMessage(strErr));
@@ -393,7 +393,7 @@ static int JNI_getMatrixOfString(JNIEnv *env, jobject obj_this, jclass class_thi
393 return 1; 393 return 1;
394 } 394 }
395 395
396 strErr = readNamedMatrixOfString(name, &cm, &cn, pLength, pStrings); 396 strErr = readNamedMatrixOfString(pvApiCtx, name, &cm, &cn, pLength, pStrings);
397 if(strErr.iErr) 397 if(strErr.iErr)
398 { 398 {
399 fprintf(stderr,"%s", getErrorMessage(strErr)); 399 fprintf(stderr,"%s", getErrorMessage(strErr));
@@ -420,7 +420,7 @@ static int JNI_getMatrixOfString(JNIEnv *env, jobject obj_this, jclass class_thi
420 } 420 }
421 } 421 }
422 422
423 strErr = readNamedMatrixOfString(name, &cm, &cn, pLength, pStrings); 423 strErr = readNamedMatrixOfString(pvApiCtx, name, &cm, &cn, pLength, pStrings);
424 if(strErr.iErr) 424 if(strErr.iErr)
425 { 425 {
426 fprintf(stderr,"%s", getErrorMessage(strErr)); 426 fprintf(stderr,"%s", getErrorMessage(strErr));
@@ -459,7 +459,7 @@ static int JNI_getMatrixOfBoolean(JNIEnv *env, jobject obj_this, jclass class_th
459 return 1; 459 return 1;
460 } 460 }
461 461
462 strErr = readNamedMatrixOfBoolean(name, &cm, &cn, CX); 462 strErr = readNamedMatrixOfBoolean(pvApiCtx, name, &cm, &cn, CX);
463 if(strErr.iErr) 463 if(strErr.iErr)
464 { 464 {
465 fprintf(stderr,"%s", getErrorMessage(strErr)); 465 fprintf(stderr,"%s", getErrorMessage(strErr));
@@ -500,7 +500,7 @@ static int JNI_setMatrixOfInteger(JNIEnv *env, jobject obj_this, jclass class_th
500 500
501 for (i = 0; i < (Rows * Cols); i++) icx[i] = (int)cx[i]; 501 for (i = 0; i < (Rows * Cols); i++) icx[i] = (int)cx[i];
502 502
503 strErr = createNamedMatrixOfInteger32(name, Rows, Cols, icx); 503 strErr = createNamedMatrixOfInteger32(pvApiCtx, name, Rows, Cols, icx);
504 if(strErr.iErr) 504 if(strErr.iErr)
505 { 505 {
506 fprintf(stderr,"%s", getErrorMessage(strErr)); 506 fprintf(stderr,"%s", getErrorMessage(strErr));
@@ -523,7 +523,7 @@ static int JNI_setMatrixOfDouble(JNIEnv *env, jobject obj_this, jclass class_thi
523 jdoubleArray jx = (*env)->GetObjectField(env, obj_this, id_x); 523 jdoubleArray jx = (*env)->GetObjectField(env, obj_this, id_x);
524 double *cx = (*env)->GetDoubleArrayElements(env, jx, NULL); 524 double *cx = (*env)->GetDoubleArrayElements(env, jx, NULL);
525 525
526 strErr = createNamedMatrixOfDouble(name, Rows, Cols, cx); 526 strErr = createNamedMatrixOfDouble(pvApiCtx, name, Rows, Cols, cx);
527 if(strErr.iErr) 527 if(strErr.iErr)
528 { 528 {
529 fprintf(stderr,"%s", getErrorMessage(strErr)); 529 fprintf(stderr,"%s", getErrorMessage(strErr));
@@ -548,7 +548,7 @@ static int JNI_setMatrixOfComplex(JNIEnv *env, jobject obj_this, jclass class_th
548 double *cx = (*env)->GetDoubleArrayElements(env, jx, NULL); 548 double *cx = (*env)->GetDoubleArrayElements(env, jx, NULL);
549 double *cy = (*env)->GetDoubleArrayElements(env, jy, NULL); 549 double *cy = (*env)->GetDoubleArrayElements(env, jy, NULL);
550 550
551 strErr = createNamedComplexMatrixOfDouble(name, Rows, Cols, cx, cy); 551 strErr = createNamedComplexMatrixOfDouble(pvApiCtx, name, Rows, Cols, cx, cy);
552 if(strErr.iErr) 552 if(strErr.iErr)
553 { 553 {
554 fprintf(stderr,"%s", getErrorMessage(strErr)); 554 fprintf(stderr,"%s", getErrorMessage(strErr));
@@ -586,7 +586,7 @@ static int JNI_setMatrixOfString(JNIEnv *env, jobject obj_this, jclass class_thi
586 (*env)->ReleaseStringUTFChars(env, jelement, element); 586 (*env)->ReleaseStringUTFChars(env, jelement, element);
587 } 587 }
588 588
589 strErr = createNamedMatrixOfString(name, Rows, Cols, pStrings); 589 strErr = createNamedMatrixOfString(pvApiCtx, name, Rows, Cols, pStrings);
590 if(strErr.iErr) 590 if(strErr.iErr)
591 { 591 {
592 fprintf(stderr,"%s", getErrorMessage(strErr)); 592 fprintf(stderr,"%s", getErrorMessage(strErr));
@@ -621,7 +621,7 @@ static int JNI_setMatrixOfBoolean(JNIEnv *env, jobject obj_this, jclass class_th
621 CX[i] = (int)cx[i]; 621 CX[i] = (int)cx[i];
622 } 622 }
623 623
624 strErr = createNamedMatrixOfBoolean(name, Rows, Cols, CX); 624 strErr = createNamedMatrixOfBoolean(pvApiCtx, name, Rows, Cols, CX);
625 if(strErr.iErr) 625 if(strErr.iErr)
626 { 626 {
627 fprintf(stderr,"%s", getErrorMessage(strErr)); 627 fprintf(stderr,"%s", getErrorMessage(strErr));
diff --git a/scilab/modules/javasci/src/c/javasci_SciBooleanArray.c b/scilab/modules/javasci/src/c/javasci_SciBooleanArray.c
index d3ee3b0..4c6dda1 100644
--- a/scilab/modules/javasci/src/c/javasci_SciBooleanArray.c
+++ b/scilab/modules/javasci/src/c/javasci_SciBooleanArray.c
@@ -43,7 +43,7 @@ JNIEXPORT jboolean JNICALL Java_javasci_SciBooleanArray_GetElement(JNIEnv *env ,
43 int i = 0; 43 int i = 0;
44 int cm = 0, cn = 0; 44 int cm = 0, cn = 0;
45 45
46 strErr = getNamedVarDimension((char*)cname, &dimension[0], &dimension[1]); 46 strErr = getNamedVarDimension(pvApiCtx, (char*)cname, &dimension[0], &dimension[1]);
47 if(strErr.iErr) 47 if(strErr.iErr)
48 { 48 {
49 fprintf(stderr,"%s", getErrorMessage(strErr)); 49 fprintf(stderr,"%s", getErrorMessage(strErr));
@@ -79,7 +79,7 @@ JNIEXPORT jboolean JNICALL Java_javasci_SciBooleanArray_GetElement(JNIEnv *env ,
79 return 1; 79 return 1;
80 } 80 }
81 81
82 strErr = readNamedMatrixOfBoolean((char*)cname, &cm, &cn, CX); 82 strErr = readNamedMatrixOfBoolean(pvApiCtx, (char*)cname, &cm, &cn, CX);
83 if(strErr.iErr) 83 if(strErr.iErr)
84 { 84 {
85 fprintf(stderr,"%s", getErrorMessage(strErr)); 85 fprintf(stderr,"%s", getErrorMessage(strErr));
diff --git a/scilab/modules/javasci/src/c/javasci_SciComplexArray.c b/scilab/modules/javasci/src/c/javasci_SciComplexArray.c
index 2920b1f..331cc6e 100644
--- a/scilab/modules/javasci/src/c/javasci_SciComplexArray.c
+++ b/scilab/modules/javasci/src/c/javasci_SciComplexArray.c
@@ -45,7 +45,7 @@ JNIEXPORT jdouble JNICALL Java_javasci_SciComplexArray_GetRealPartElement(JNIEnv
45 45
46 int cm = 0, cn = 0; 46 int cm = 0, cn = 0;
47 47
48 strErr = getNamedVarDimension((char*)cname, &dimension[0], &dimension[1]); 48 strErr = getNamedVarDimension(pvApiCtx, (char*)cname, &dimension[0], &dimension[1]);
49 if(strErr.iErr) 49 if(strErr.iErr)
50 { 50 {
51 fprintf(stderr,"%s", getErrorMessage(strErr)); 51 fprintf(stderr,"%s", getErrorMessage(strErr));
@@ -76,7 +76,7 @@ JNIEXPORT jdouble JNICALL Java_javasci_SciComplexArray_GetRealPartElement(JNIEnv
76 jy = (*env)->GetObjectField(env, obj_this, id_y); 76 jy = (*env)->GetObjectField(env, obj_this, id_y);
77 cy = (*env)->GetDoubleArrayElements(env, jy, NULL); 77 cy = (*env)->GetDoubleArrayElements(env, jy, NULL);
78 78
79 strErr = readNamedComplexMatrixOfDouble((char*)cname, &cm, &cn, cx, cy); 79 strErr = readNamedComplexMatrixOfDouble(pvApiCtx, (char*)cname, &cm, &cn, cx, cy);
80 if(strErr.iErr) 80 if(strErr.iErr)
81 { 81 {
82 fprintf(stderr,"%s", getErrorMessage(strErr)); 82 fprintf(stderr,"%s", getErrorMessage(strErr));
@@ -142,7 +142,7 @@ JNIEXPORT jdouble JNICALL Java_javasci_SciComplexArray_GetImaginaryPartElement(J
142 142
143 int cm = 0, cn = 0; 143 int cm = 0, cn = 0;
144 144
145 strErr = getNamedVarDimension((char*)cname, &dimension[0], &dimension[1]); 145 strErr = getNamedVarDimension(pvApiCtx, (char*)cname, &dimension[0], &dimension[1]);
146 if(strErr.iErr) 146 if(strErr.iErr)
147 { 147 {
148 fprintf(stderr,"%s", getErrorMessage(strErr)); 148 fprintf(stderr,"%s", getErrorMessage(strErr));
@@ -173,7 +173,7 @@ JNIEXPORT jdouble JNICALL Java_javasci_SciComplexArray_GetImaginaryPartElement(J
173 jy = (*env)->GetObjectField(env, obj_this, id_y); 173 jy = (*env)->GetObjectField(env, obj_this, id_y);
174 cy = (*env)->GetDoubleArrayElements(env, jy, NULL); 174 cy = (*env)->GetDoubleArrayElements(env, jy, NULL);
175 175
176 strErr = readNamedComplexMatrixOfDouble((char*)cname, &cm, &cn, cx, cy); 176 strErr = readNamedComplexMatrixOfDouble(pvApiCtx, (char*)cname, &cm, &cn, cx, cy);
177 if(strErr.iErr) 177 if(strErr.iErr)
178 { 178 {
179 fprintf(stderr,"%s", getErrorMessage(strErr)); 179 fprintf(stderr,"%s", getErrorMessage(strErr));
diff --git a/scilab/modules/javasci/src/c/javasci_SciDoubleArray.c b/scilab/modules/javasci/src/c/javasci_SciDoubleArray.c
index f03ed9b..1045dbe 100644
--- a/scilab/modules/javasci/src/c/javasci_SciDoubleArray.c
+++ b/scilab/modules/javasci/src/c/javasci_SciDoubleArray.c
@@ -41,7 +41,7 @@ JNIEXPORT jdouble JNICALL Java_javasci_SciDoubleArray_GetElement(JNIEnv *env , j
41 41
42 int cm = 0, cn = 0; 42 int cm = 0, cn = 0;
43 43
44 strErr = getNamedVarDimension((char*)cname, &dimension[0], &dimension[1]); 44 strErr = getNamedVarDimension(pvApiCtx, (char*)cname, &dimension[0], &dimension[1]);
45 if(strErr.iErr) 45 if(strErr.iErr)
46 { 46 {
47 fprintf(stderr,"%s", getErrorMessage(strErr)); 47 fprintf(stderr,"%s", getErrorMessage(strErr));
@@ -68,7 +68,7 @@ JNIEXPORT jdouble JNICALL Java_javasci_SciDoubleArray_GetElement(JNIEnv *env , j
68 jx = (*env)->GetObjectField(env, obj_this, id_x); 68 jx = (*env)->GetObjectField(env, obj_this, id_x);
69 cx = (*env)->GetDoubleArrayElements(env, jx, NULL); 69 cx = (*env)->GetDoubleArrayElements(env, jx, NULL);
70 70
71 strErr = readNamedMatrixOfDouble((char*)cname, &cm, &cn, cx); 71 strErr = readNamedMatrixOfDouble(pvApiCtx, (char*)cname, &cm, &cn, cx);
72 if(strErr.iErr) 72 if(strErr.iErr)
73 { 73 {
74 fprintf(stderr,"%s", getErrorMessage(strErr)); 74 fprintf(stderr,"%s", getErrorMessage(strErr));
diff --git a/scilab/modules/javasci/src/c/javasci_SciIntegerArray.c b/scilab/modules/javasci/src/c/javasci_SciIntegerArray.c
index 4c1bb1e..cec4ad9 100644
--- a/scilab/modules/javasci/src/c/javasci_SciIntegerArray.c
+++ b/scilab/modules/javasci/src/c/javasci_SciIntegerArray.c
@@ -41,7 +41,7 @@ JNIEXPORT jint JNICALL Java_javasci_SciIntegerArray_GetElement(JNIEnv *env , job
41 41
42 int cm = 0, cn = 0; 42 int cm = 0, cn = 0;
43 43
44 strErr = getNamedVarDimension((char*)cname, &dimension[0], &dimension[1]); 44 strErr = getNamedVarDimension(pvApiCtx, (char*)cname, &dimension[0], &dimension[1]);
45 if(strErr.iErr) 45 if(strErr.iErr)
46 { 46 {
47 fprintf(stderr,"%s", getErrorMessage(strErr)); 47 fprintf(stderr,"%s", getErrorMessage(strErr));
@@ -79,7 +79,7 @@ JNIEXPORT jint JNICALL Java_javasci_SciIntegerArray_GetElement(JNIEnv *env , job
79 79
80 for (j = 0; j < cm * cn; j++) icx[j] = (int)cx[j]; 80 for (j = 0; j < cm * cn; j++) icx[j] = (int)cx[j];
81 81
82 strErr = readNamedMatrixOfInteger32((char*)cname, &cm, &cn, icx); 82 strErr = readNamedMatrixOfInteger32(pvApiCtx, (char*)cname, &cm, &cn, icx);
83 if(strErr.iErr) 83 if(strErr.iErr)
84 { 84 {
85 fprintf(stderr,"%s", getErrorMessage(strErr)); 85 fprintf(stderr,"%s", getErrorMessage(strErr));
diff --git a/scilab/modules/javasci/src/c/javasci_SciStringArray.c b/scilab/modules/javasci/src/c/javasci_SciStringArray.c
index 1946a04..1c137d9 100644
--- a/scilab/modules/javasci/src/c/javasci_SciStringArray.c
+++ b/scilab/modules/javasci/src/c/javasci_SciStringArray.c
@@ -44,7 +44,7 @@ JNIEXPORT jstring JNICALL Java_javasci_SciStringArray_GetElement(JNIEnv *env , j
44 44
45 int dimension[2]; 45 int dimension[2];
46 46
47 strErr = getNamedVarDimension((char*)cname, &dimension[0], &dimension[1]); 47 strErr = getNamedVarDimension(pvApiCtx, (char*)cname, &dimension[0], &dimension[1]);
48 if(strErr.iErr) 48 if(strErr.iErr)
49 { 49 {
50 fprintf(stderr,"%s", getErrorMessage(strErr)); 50 fprintf(stderr,"%s", getErrorMessage(strErr));
@@ -82,7 +82,7 @@ JNIEXPORT jstring JNICALL Java_javasci_SciStringArray_GetElement(JNIEnv *env , j
82 return jstrToReturn; 82 return jstrToReturn;
83 } 83 }
84 84
85 strErr = readNamedMatrixOfString((char*)cname, &cm, &cn, pLength, pStrings); 85 strErr = readNamedMatrixOfString(pvApiCtx, (char*)cname, &cm, &cn, pLength, pStrings);
86 if(strErr.iErr) 86 if(strErr.iErr)
87 { 87 {
88 fprintf(stderr,"%s", getErrorMessage(strErr)); 88 fprintf(stderr,"%s", getErrorMessage(strErr));
@@ -115,7 +115,7 @@ JNIEXPORT jstring JNICALL Java_javasci_SciStringArray_GetElement(JNIEnv *env , j
115 } 115 }
116 } 116 }
117 117
118 strErr = readNamedMatrixOfString((char*)cname, &cm, &cn, pLength, pStrings); 118 strErr = readNamedMatrixOfString(pvApiCtx, (char*)cname, &cm, &cn, pLength, pStrings);
119 if(strErr.iErr) 119 if(strErr.iErr)
120 { 120 {
121 fprintf(stderr,"%s", getErrorMessage(strErr)); 121 fprintf(stderr,"%s", getErrorMessage(strErr));
diff --git a/scilab/modules/javasci/src/c/javasci_Scilab.c b/scilab/modules/javasci/src/c/javasci_Scilab.c
index 010cfec..d6b005e 100644
--- a/scilab/modules/javasci/src/c/javasci_Scilab.c
+++ b/scilab/modules/javasci/src/c/javasci_Scilab.c
@@ -102,7 +102,7 @@ JNIEXPORT jboolean JNICALL Java_javasci_Scilab_ExistVar(JNIEnv *env , jclass cl,
102 return JNI_FALSE; 102 return JNI_FALSE;
103 } 103 }
104 104
105 strErr = getNamedVarType((char*)cvarName, &sciType); 105 strErr = getNamedVarType(pvApiCtx, (char*)cvarName, &sciType);
106 if(strErr.iErr) 106 if(strErr.iErr)
107 { 107 {
108 fprintf(stderr,"%s", getErrorMessage(strErr)); 108 fprintf(stderr,"%s", getErrorMessage(strErr));
@@ -154,7 +154,7 @@ JNIEXPORT jint JNICALL Java_javasci_Scilab_TypeVar(JNIEnv *env , jclass cl, jstr
154 return type; 154 return type;
155 } 155 }
156 156
157 strErr = getNamedVarType((char *)cvarName, (int*)&type); 157 strErr = getNamedVarType(pvApiCtx, (char *)cvarName, (int*)&type);
158 (*env)->ReleaseStringUTFChars(env, varName , cvarName); 158 (*env)->ReleaseStringUTFChars(env, varName , cvarName);
159 159
160 return type; 160 return type;
diff --git a/scilab/modules/javasci/src/c/javasci_Scilab2.c b/scilab/modules/javasci/src/c/javasci_Scilab2.c
index 97caec2..837bf55 100644
--- a/scilab/modules/javasci/src/c/javasci_Scilab2.c
+++ b/scilab/modules/javasci/src/c/javasci_Scilab2.c
@@ -59,7 +59,7 @@ JNIEXPORT void JNICALL Java_javasci_Scilab_sendDoubleMatrix (JNIEnv *env, jclass
59 cname = (*env)->GetStringUTFChars(env, jname, NULL); 59 cname = (*env)->GetStringUTFChars(env, jname, NULL);
60 matrix = (*env)->GetDoubleArrayElements(env, jmatrix, NULL); 60 matrix = (*env)->GetDoubleArrayElements(env, jmatrix, NULL);
61 61
62 strErr = createNamedMatrixOfDouble((char*)cname, nbRow, nbCol, matrix); 62 strErr = createNamedMatrixOfDouble(pvApiCtx, (char*)cname, nbRow, nbCol, matrix);
63 if(strErr.iErr) 63 if(strErr.iErr)
64 { 64 {
65 fprintf(stderr,"%s", getErrorMessage(strErr)); 65 fprintf(stderr,"%s", getErrorMessage(strErr));
@@ -95,7 +95,7 @@ JNIEXPORT void JNICALL Java_javasci_Scilab_receiveDoubleMatrix (JNIEnv *env, jcl
95 95
96 cname = (*env)->GetStringUTFChars(env, jname, NULL); 96 cname = (*env)->GetStringUTFChars(env, jname, NULL);
97 97
98 strErr = readNamedMatrixOfDouble((char*)cname, &rows, &cols, NULL); 98 strErr = readNamedMatrixOfDouble(pvApiCtx, (char*)cname, &rows, &cols, NULL);
99 if(strErr.iErr) 99 if(strErr.iErr)
100 { 100 {
101 fprintf(stderr,"%s", getErrorMessage(strErr)); 101 fprintf(stderr,"%s", getErrorMessage(strErr));
@@ -120,7 +120,7 @@ JNIEXPORT void JNICALL Java_javasci_Scilab_receiveDoubleMatrix (JNIEnv *env, jcl
120 120
121 matrix = (*env)->GetDoubleArrayElements(env, jmatrix, NULL); 121 matrix = (*env)->GetDoubleArrayElements(env, jmatrix, NULL);
122 122
123 strErr = readNamedMatrixOfDouble((char*)cname, &rows, &cols, matrix); 123 strErr = readNamedMatrixOfDouble(pvApiCtx, (char*)cname, &rows, &cols, matrix);
124 if(strErr.iErr) 124 if(strErr.iErr)
125 { 125 {
126 fprintf(stderr,"%s", getErrorMessage(strErr)); 126 fprintf(stderr,"%s", getErrorMessage(strErr));
@@ -158,7 +158,7 @@ JNIEXPORT void JNICALL Java_javasci_Scilab_sendComplexMatrix (JNIEnv *env, jclas
158 cx = (*env)->GetDoubleArrayElements(env, jx, NULL); 158 cx = (*env)->GetDoubleArrayElements(env, jx, NULL);
159 cy = (*env)->GetDoubleArrayElements(env, jy, NULL); 159 cy = (*env)->GetDoubleArrayElements(env, jy, NULL);
160 160
161 strErr = createNamedComplexMatrixOfDouble((char*)cname, nbRow, nbCol, cx, cy); 161 strErr = createNamedComplexMatrixOfDouble(pvApiCtx, (char*)cname, nbRow, nbCol, cx, cy);
162 if(strErr.iErr) 162 if(strErr.iErr)
163 { 163 {
164 fprintf(stderr,"%s", getErrorMessage(strErr)); 164 fprintf(stderr,"%s", getErrorMessage(strErr));
@@ -197,7 +197,7 @@ JNIEXPORT void JNICALL Java_javasci_Scilab_receiveComplexMatrix (JNIEnv *env, jc
197 197
198 cname = (*env)->GetStringUTFChars(env, jname, NULL); 198 cname = (*env)->GetStringUTFChars(env, jname, NULL);
199 199
200 strErr = readNamedComplexMatrixOfDouble((char*)cname, &rows, &cols, NULL, NULL); 200 strErr = readNamedComplexMatrixOfDouble(pvApiCtx, (char*)cname, &rows, &cols, NULL, NULL);
201 if(strErr.iErr) 201 if(strErr.iErr)
202 { 202 {
203 fprintf(stderr,"%s", getErrorMessage(strErr)); 203 fprintf(stderr,"%s", getErrorMessage(strErr));
@@ -223,7 +223,7 @@ JNIEXPORT void JNICALL Java_javasci_Scilab_receiveComplexMatrix (JNIEnv *env, jc
223 cx = (*env)->GetDoubleArrayElements(env, jx, NULL); 223 cx = (*env)->GetDoubleArrayElements(env, jx, NULL);
224 cy = (*env)->GetDoubleArrayElements(env, jy, NULL); 224 cy = (*env)->GetDoubleArrayElements(env, jy, NULL);
225 225
226 strErr = readNamedComplexMatrixOfDouble((char*)cname, &rows, &cols, cx, cy); 226 strErr = readNamedComplexMatrixOfDouble(pvApiCtx, (char*)cname, &rows, &cols, cx, cy);
227 if(strErr.iErr) 227 if(strErr.iErr)
228 { 228 {
229 fprintf(stderr,"%s", getErrorMessage(strErr)); 229 fprintf(stderr,"%s", getErrorMessage(strErr));
@@ -279,7 +279,7 @@ JNIEXPORT void JNICALL Java_javasci_Scilab_sendStringMatrix (JNIEnv *env, jclass
279 (*env)->ReleaseStringUTFChars(env, jelement, element); 279 (*env)->ReleaseStringUTFChars(env, jelement, element);
280 } 280 }
281 281
282 createNamedMatrixOfString((char*)cname, nbRow, nbCol, pStrings); 282 createNamedMatrixOfString(pvApiCtx, (char*)cname, nbRow, nbCol, pStrings);
283 283
284 (*env)->ReleaseStringUTFChars(env, jname , cname); 284 (*env)->ReleaseStringUTFChars(env, jname , cname);
285 freeArrayOfString(pStrings, nbRow * nbCol); 285 freeArrayOfString(pStrings, nbRow * nbCol);
@@ -313,7 +313,7 @@ JNIEXPORT void JNICALL Java_javasci_Scilab_receiveStringMatrix (JNIEnv *env, jcl
313 313
314 cname = (*env)->GetStringUTFChars(env, jname, NULL); 314 cname = (*env)->GetStringUTFChars(env, jname, NULL);
315 315
316 strErr = readNamedMatrixOfString((char*)cname, &rows, &cols, pLength, pStrings); 316 strErr = readNamedMatrixOfString(pvApiCtx, (char*)cname, &rows, &cols, pLength, pStrings);
317 if(strErr.iErr) 317 if(strErr.iErr)
318 { 318 {
319 fprintf(stderr,"%s", getErrorMessage(strErr)); 319 fprintf(stderr,"%s", getErrorMessage(strErr));
@@ -340,7 +340,7 @@ JNIEXPORT void JNICALL Java_javasci_Scilab_receiveStringMatrix (JNIEnv *env, jcl
340 return; 340 return;
341 } 341 }
342 342
343 strErr = readNamedMatrixOfString((char*)cname, &rows, &cols, pLength, pStrings); 343 strErr = readNamedMatrixOfString(pvApiCtx, (char*)cname, &rows, &cols, pLength, pStrings);
344 if(strErr.iErr) 344 if(strErr.iErr)
345 { 345 {
346 fprintf(stderr,"%s", getErrorMessage(strErr)); 346 fprintf(stderr,"%s", getErrorMessage(strErr));
@@ -361,7 +361,7 @@ JNIEXPORT void JNICALL Java_javasci_Scilab_receiveStringMatrix (JNIEnv *env, jcl
361 } 361 }
362 } 362 }
363 363
364 strErr = readNamedMatrixOfString((char*)cname, &rows, &cols, pLength, pStrings); 364 strErr = readNamedMatrixOfString(pvApiCtx, (char*)cname, &rows, &cols, pLength, pStrings);
365 if(strErr.iErr) 365 if(strErr.iErr)
366 { 366 {
367 fprintf(stderr,"%s", getErrorMessage(strErr)); 367 fprintf(stderr,"%s", getErrorMessage(strErr));
@@ -424,14 +424,14 @@ JNIEXPORT jobject JNICALL Java_javasci_Scilab_receiveDataByName (JNIEnv *env, jc
424 cname = (*env)->GetStringUTFChars(env, name, NULL); 424 cname = (*env)->GetStringUTFChars(env, name, NULL);
425 (*env)->ReleaseStringUTFChars(env, name , cname); 425 (*env)->ReleaseStringUTFChars(env, name , cname);
426 426
427 strErr = getNamedVarType((char*)cname, &type); /* give type */ 427 strErr = getNamedVarType(pvApiCtx, (char*)cname, &type); /* give type */
428 if(strErr.iErr) 428 if(strErr.iErr)
429 { 429 {
430 fprintf(stderr,"%s", getErrorMessage(strErr)); 430 fprintf(stderr,"%s", getErrorMessage(strErr));
431 return obj; 431 return obj;
432 } 432 }
433 433
434 strErr = getNamedVarDimension((char*)cname, &Dimensions[0], &Dimensions[1]); 434 strErr = getNamedVarDimension(pvApiCtx, (char*)cname, &Dimensions[0], &Dimensions[1]);
435 if(strErr.iErr) 435 if(strErr.iErr)
436 { 436 {
437 fprintf(stderr,"%s", getErrorMessage(strErr)); 437 fprintf(stderr,"%s", getErrorMessage(strErr));
@@ -442,7 +442,7 @@ JNIEXPORT jobject JNICALL Java_javasci_Scilab_receiveDataByName (JNIEnv *env, jc
442 { 442 {
443 case sci_matrix : 443 case sci_matrix :
444 444
445 if (isNamedVarComplex((char*)cname)) 445 if (isNamedVarComplex(pvApiCtx, (char*)cname))
446 { 446 {
447 return getComplexMatrix(env, cl, name, Dimensions[0], Dimensions[1]); 447 return getComplexMatrix(env, cl, name, Dimensions[0], Dimensions[1]);
448 } 448 }