Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use API setter/unsetter for S4 objects #1940

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -264,12 +264,12 @@ SEXP r_clone_referenced(SEXP x);
SEXP r_call_n(SEXP fn, SEXP* tags, SEXP* cars);

static inline SEXP r_mark_s4(SEXP x) {
SET_S4_OBJECT(x);
return(x);
x = Rf_asS4(x, (Rboolean) 1, 1);
return x;
}
static inline SEXP r_unmark_s4(SEXP x) {
UNSET_S4_OBJECT(x);
return(x);
x = Rf_asS4(x, (Rboolean) 0, 1);
return x;
}

bool r_has_name_at(SEXP names, R_len_t i);
Expand Down
Loading