Skip to content

Commit

Permalink
Replace non-API EXTPTR_PTR with R_ExternalPtrAddr
Browse files Browse the repository at this point in the history
  • Loading branch information
andrjohns committed Mar 6, 2025
1 parent d7c2871 commit fff3640
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions rstan/rstan/src/misc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,8 @@ SEXP is_Null_NS(SEXP ns) {
LOGICAL(ans)[0] = 1;
PROTECT(ns);
if (TYPEOF(ns) == EXTPTRSXP) {
// Rprintf("ptr=%p.\n", EXTPTR_PTR(ns));
if (EXTPTR_PTR(ns) != NULL) LOGICAL(ans)[0] = 0;
if (R_ExternalPtrAddr(ns) != NULL) LOGICAL(ans)[0] = 0;
}
UNPROTECT(2);
return ans;
}

0 comments on commit fff3640

Please sign in to comment.