Skip to content

Commit

Permalink
[SWIG] fix swig build warnings/errors on windows (#2141)
Browse files Browse the repository at this point in the history
  • Loading branch information
imatiach-msft authored and StrikerRUS committed May 4, 2019
1 parent 40e3048 commit 7156c9b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions swig/lightgbmlib.i
Expand Up @@ -160,7 +160,7 @@
// int* indices0 = (int*)jenv->GetPrimitiveArrayCritical(indices, 0);
// double* values0 = (double*)jenv->GetPrimitiveArrayCritical(values, 0);
// in test-usecase an alternative to GetPrimitiveArrayCritical as it performs copies
int* indices0 = jenv->GetIntArrayElements(indices, 0);
int* indices0 = (int *)jenv->GetIntArrayElements(indices, 0);
double* values0 = jenv->GetDoubleArrayElements(values, 0);

jniCache.push_back({indices, values, indices0, values0, size});
Expand All @@ -187,7 +187,7 @@
// jenv->ReleasePrimitiveArrayCritical(jc.values, jc.values0, JNI_ABORT);
// jenv->ReleasePrimitiveArrayCritical(jc.indices, jc.indices0, JNI_ABORT);
jenv->ReleaseDoubleArrayElements(jc.values, jc.values0, JNI_ABORT);
jenv->ReleaseIntArrayElements(jc.indices, jc.indices0, JNI_ABORT);
jenv->ReleaseIntArrayElements(jc.indices, (jint *)jc.indices0, JNI_ABORT);
}

return ret;
Expand Down

0 comments on commit 7156c9b

Please sign in to comment.