maintain existing interface and offer new one#1135
Conversation
|
Thanks @kevinushey for raising this issue. Completely agree. This LGTM too. Just a small detail: on second pass, I believe that the calls I made to Rcpp/inst/include/Rcpp/traits/named_object.h Lines 40 to 59 in 2c2eb89 should have been |
|
It's just two inlined one-liners but I agree that it nicer to see the top-level API function used -- so committed (and tested locally and pushed). |
Codecov Report
@@ Coverage Diff @@
## master #1135 +/- ##
=======================================
Coverage 97.43% 97.43%
=======================================
Files 64 64
Lines 2764 2764
=======================================
Hits 2693 2693
Misses 71 71
|
|
Thanks for the quick feedback on this, and for highlighting it in the first place. Will fold it now, and 1.0.6.3 is where we're at now. |

This does a partial revert of #1133 in the sense that we should not have altered the existing top-level API (my bad for sleeping on that, and thanks to @kevinushey for the wake-up on it). The use of the preserve/release pair is however not all that widespread so this PR switches to using the new token / precious list via two new functions.
Eventually, as hinted by @kevinushey in this #1133 (comment) we may want to rework this.
A simpler solution may just be to gradually deprecate and remove the three old functions -- as the runs this weekend showed they do not appear to be used. So we could keep them and demote to another internal header that gets pulled if a new
#defineis set and over time we flip is default value but let other users set it if they need it./cc @Enchufa2 whom I can't seem to tag under reviewers
Checklist
R CMD checkstill passes all tests