зеркало из https://github.com/microsoft/LightGBM.git
[SWIG] fix swig build warnings/errors on windows (#2141)
This commit is contained in:
Родитель
40e3048f61
Коммит
7156c9b09e
|
@ -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});
|
||||
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче