Skip to content

Commit

Permalink
explicitly declare Rboolean type
Browse files Browse the repository at this point in the history
  • Loading branch information
dipterix committed Jan 15, 2024
1 parent 16e19b2 commit 6f01684
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -289,10 +289,11 @@ bool is_namespace(SEXP &rho) {
if (rho == R_BaseNamespace)
return true;
else if (TYPEOF(rho) == ENVSXP) {
SEXP info = Rf_findVarInFrame3(rho, Rf_install(".__NAMESPACE__."), TRUE);
Rboolean do_get = TRUE;
SEXP info = Rf_findVarInFrame3(rho, Rf_install(".__NAMESPACE__."), do_get);
if (info != R_UnboundValue && TYPEOF(info) == ENVSXP) {
PROTECT(info);
SEXP spec = Rf_findVarInFrame3(info, Rf_install("spec"), TRUE);
SEXP spec = Rf_findVarInFrame3(info, Rf_install("spec"), do_get);
UNPROTECT(1);
if (spec != R_UnboundValue &&
TYPEOF(spec) == STRSXP && LENGTH(spec) > 0)
Expand Down

0 comments on commit 6f01684

Please sign in to comment.