Switch one PI to M_PI to support STRICT_R_HEADERS #118
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Dear s2 team,
The Rcpp team is trying to move towards defining
STRICT_R_HEADERS
by default. Please the issue ticket at RcppCore/Rcpp#1158 for motivation and history. In late April and early May, we identified around 51 packages needing changes (which we generally sent by PR or, in case of no known git repo, emailed patch). We are thrilled to report that 38 have already made the changes, including some on CRAN. We also accomodated one first fix in Rcpp itself -- thecfloat
(orfloat.h
) header is needed for the floating limits such asDBL_MAX
. A common remaining issue is use ofPI
.And it appears that your most recent package change introduced a mild regression. One line of code refers to
PI
whereM_PI
would make us whole. This PR changes this. It also adds a define forSTRICT_R_HEADERS
to test this, you are more than welcome to remove that define or place it elsewhere. I can also remove it from the PR if you like.As discussed in RcppCore/Rcpp#1158, this is not urgent, but we of course welcome relatively prompt resolution at CRAN so when we continue to test for this (at a likely montly pace) so we do not get false positives as we will continue to use the CRAN set of packages (as opposed to hand-curated set of upstream dev versions).
Many thanks for your help, and I hope you continue to find Rcpp helpful. Please don't hesitate to ask if you have any questions.