Skip to content
Prev 7755 / 10988 Next

[Rcpp-devel] Fwd: Re: Making objects in the C++ "side" persistent

On Wednesday 18 Jun 2014 15:47:38 Martyn Plummer wrote:
thanks for the clarification. I can see the reasoning, as the C side should not 
do anything that can cause it to fall over, though it's a bit tricky when the 
code is generated for you by an external framework, and it does fall over.

(I did find that Rcpp::Modules tries to check for null pointer values in the R 
code using is.null(), which as far as I can see will always return FALSE).

In any case I'm now using Reference Classes to interface with the C++ code and 
that seems to be relatively easy to make safe. It still allows the user to 
crash the session by manually calling .Call() with an inappropriate external 
pointer. But that is perhaps acceptable (?).

cheers,

Martin