[Rcpp-devel] tracking volatile bug
Dirk Eddelbuettel
edd at debian.org
Sat Nov 22 16:57:36 CET 2014
On 21 November 2014 at 23:50, Sokol Serguei wrote:
| If I did not use the protection in my Rcpp code it's because
| I did not see it in any example of quick ref guide:
| http://cran.r-project.org/web/packages/Rcpp/vignettes/Rcpp-quickref.pdf
| I didn't see any mention of PROTECT necessity neither in
| http://dirk.eddelbuettel.com/code/rcpp/Rcpp-introduction.pdf
| especially in the part dedicated to the use of wrap().
I am sorry but that is somewhat uncalled for.
We rarely advocate a programming style advocating SEXP manipulation (apart
from rare cases, or in the guts of our code). You programmed the plain C API
for R, apart from using some utility functions from Rcpp to access functions.
For this programming style, you should go to r-devel rather than coming here.
What you do is pretty different from standard Rcpp use, or what we recommend.
Blaming us for not documenting what we consider inappropriate style is not
only circular but also continues to misunderstand why we do what we do here,
and how we do it.
| I supposed (very naively, it is clear now) that necessary wrapping and
| protection was automagicaly added behind the stage by Rcpp.
It of course happes automagically if and only if you use Rcpp datatypes.
>From what I understand you did not use those, and hence got no magic.
Dirk
--
http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
More information about the Rcpp-devel
mailing list