Skip to content

Rcpp compat for Rf_error()#263

Merged
shikokuchuo merged 2 commits intomainfrom
rcpp
Mar 3, 2026
Merged

Rcpp compat for Rf_error()#263
shikokuchuo merged 2 commits intomainfrom
rcpp

Conversation

@shikokuchuo
Copy link
Copy Markdown
Member

@shikokuchuo shikokuchuo commented Mar 3, 2026

Fixes #262.

We use Rf_error() at 3 sites:

  1. In our own public header (inst/later_api.h) - fine as we do not include any Rcpp headers. For additional safety for callers of later_api.h with Rcpp.h this is also wrapped in () in 0cc934c.
  2. In later.cpp and later_win32.cpp for defensive guards (not usually reachable) not necessarily called from the main thread. We wrap these usages in () to prevent function-like macro expansion by the preprocessor.

@shikokuchuo shikokuchuo merged commit 21017e0 into main Mar 3, 2026
20 checks passed
@shikokuchuo shikokuchuo deleted the rcpp branch March 3, 2026 09:33
shikokuchuo added a commit that referenced this pull request Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Calls to Rf_error

1 participant