microsoft / LightGBM

A fast, distributed, high performance gradient boosting (GBT, GBDT, GBRT, GBM or MART) framework based on decision tree algorithms, used for ranking, classification and many other machine learning tasks.
https://lightgbm.readthedocs.io/en/latest/
MIT License
16.56k stars 3.82k forks source link

[R-package] Use `Rf_`-prefixed versions of protect/unprotect #6502

Closed david-cortes closed 3 months ago

david-cortes commented 3 months ago

From similar PR in XGBoost: https://github.com/dmlc/xgboost/pull/10465

This PR modifies the R C-level function code to call the versions of protect/unprotect that have Rf_ prefixes. This is currently not required by CRAN as their non-Rf equivalents PROTECT/UNPROTECT are simple defines aliasing to Rf_protect/Rf_unprotect, but the situation might change in the future.