Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tianlh
LightGBM-DCU
Commits
7156c9b0
Commit
7156c9b0
authored
May 04, 2019
by
Ilya Matiach
Committed by
Nikita Titov
May 04, 2019
Browse files
[SWIG] fix swig build warnings/errors on windows (#2141)
parent
40e3048f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
swig/lightgbmlib.i
swig/lightgbmlib.i
+2
-2
No files found.
swig/lightgbmlib.i
View file @
7156c9b0
...
@@ -160,7 +160,7 @@
...
@@ -160,7 +160,7 @@
// int* indices0 = (int*)jenv->GetPrimitiveArrayCritical(indices, 0);
// int* indices0 = (int*)jenv->GetPrimitiveArrayCritical(indices, 0);
// double* values0 = (double*)jenv->GetPrimitiveArrayCritical(values, 0);
// double* values0 = (double*)jenv->GetPrimitiveArrayCritical(values, 0);
// in test-usecase an alternative to GetPrimitiveArrayCritical as it performs copies
// 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
)
;
double
*
values0
=
jenv-
>
GetDoubleArrayElements
(
values
,
0
)
;
jniCache
.
push_back
(
{indices
,
values
,
indices0
,
values0
,
size}
)
;
jniCache
.
push_back
(
{indices
,
values
,
indices0
,
values0
,
size}
)
;
...
@@ -187,7 +187,7 @@
...
@@ -187,7 +187,7 @@
// jenv->ReleasePrimitiveArrayCritical(jc.values, jc.values0, JNI_ABORT);
// jenv->ReleasePrimitiveArrayCritical(jc.values, jc.values0, JNI_ABORT);
// jenv->ReleasePrimitiveArrayCritical(jc.indices, jc.indices0, JNI_ABORT);
// jenv->ReleasePrimitiveArrayCritical(jc.indices, jc.indices0, JNI_ABORT);
jenv-
>
ReleaseDoubleArrayElements
(
jc
.
values
,
jc
.
values0
,
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
;
return
ret
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment