Skip to content

Commit

Permalink
remove PROTECT()
Browse files Browse the repository at this point in the history
  • Loading branch information
jameslamb committed Jul 6, 2021
1 parent 71412fd commit c0a49cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R-package/src/lightgbm_R.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ SEXP LGBM_DatasetCreateFromFile_R(SEXP filename,
if (!Rf_isNull(reference)) {
ref = R_ExternalPtrAddr(reference);
}
const char* filename_ptr = CHAR(PROTECT(Rf_asChar(filename)));
const char* filename_ptr = CHAR(Rf_asChar(filename));
const char* parameters_ptr = CHAR(PROTECT(Rf_asChar(parameters)));
R_API_BEGIN();
CHECK_CALL(LGBM_DatasetCreateFromFile(filename_ptr, parameters_ptr, ref, &handle));
Expand Down

0 comments on commit c0a49cc

Please sign in to comment.