[R] Avoid symbol naming conflicts with other packages (#7245)

* don't register all R symbols

* typo
This commit is contained in:
david-cortes
2021-09-19 21:17:08 +03:00
committed by GitHub
parent e48e05e6e2
commit 61a619b5c3
3 changed files with 6 additions and 2 deletions

View File

@@ -9,6 +9,7 @@
#include <Rinternals.h>
#include <stdlib.h>
#include <R_ext/Rdynload.h>
#include <R_ext/Visibility.h>
/* FIXME:
Check these declarations against the C/Fortran source code.
@@ -89,7 +90,7 @@ static const R_CallMethodDef CallEntries[] = {
#if defined(_WIN32)
__declspec(dllexport)
#endif // defined(_WIN32)
void R_init_xgboost(DllInfo *dll) {
void attribute_visible R_init_xgboost(DllInfo *dll) {
R_registerRoutines(dll, NULL, CallEntries, NULL, NULL);
R_useDynamicSymbols(dll, FALSE);
}