Skip to content

Commit

Permalink
Use ctypes for parameters of DLL functions (#3419)
Browse files Browse the repository at this point in the history
  • Loading branch information
btrotta authored Sep 30, 2020
1 parent 692c9a5 commit f60c14f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions python-package/lightgbm/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -2976,9 +2976,9 @@ def feature_name(self):
ptr_string_buffers = (ctypes.c_char_p * num_feature)(*map(ctypes.addressof, string_buffers))
_safe_call(_LIB.LGBM_BoosterGetFeatureNames(
self.handle,
num_feature,
ctypes.c_int(num_feature),
ctypes.byref(tmp_out_len),
reserved_string_buffer_size,
ctypes.c_size_t(reserved_string_buffer_size),
ctypes.byref(required_string_buffer_size),
ptr_string_buffers))
if num_feature != tmp_out_len.value:
Expand Down Expand Up @@ -3175,9 +3175,9 @@ def __get_eval_info(self):
ptr_string_buffers = (ctypes.c_char_p * self.__num_inner_eval)(*map(ctypes.addressof, string_buffers))
_safe_call(_LIB.LGBM_BoosterGetEvalNames(
self.handle,
self.__num_inner_eval,
ctypes.c_int(self.__num_inner_eval),
ctypes.byref(tmp_out_len),
reserved_string_buffer_size,
ctypes.c_size_t(reserved_string_buffer_size),
ctypes.byref(required_string_buffer_size),
ptr_string_buffers))
if self.__num_inner_eval != tmp_out_len.value:
Expand Down

0 comments on commit f60c14f

Please sign in to comment.