Skip to content

Commit e904602

Browse files
committed
use R_NilValue instead of non-API R_UnboundValue
1 parent ebf1f89 commit e904602

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

inst/include/Rcpp/Function.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ namespace Rcpp{
7272
#if R_VERSION < R_Version(4,5,0)
7373
Shield<SEXP> env(Rf_findVarInFrame(R_NamespaceRegistry, Rf_install(ns.c_str())));
7474
#else
75-
Shield<SEXP> env(R_getVarEx(Rf_install(ns.c_str()), R_NamespaceRegistry, FALSE, R_UnboundValue));
75+
Shield<SEXP> env(R_getVarEx(Rf_install(ns.c_str()), R_NamespaceRegistry, FALSE, R_NilValue));
7676
#endif
77-
if (env == R_UnboundValue) {
77+
if (env == R_NilValue) {
7878
stop("there is no namespace called \"%s\"", ns);
7979
}
8080
get_function(name, env);

0 commit comments

Comments
 (0)