Hi,

I'm using R_MakeExternalPtr() to store handles to (COM) objects in a SEXP.

The code basically is

        sexp = R_MakeExternalPtr(handle,R_NilValue,R_NilValue);
        R_RegisterCFinalizerEx(...);

After creating the sexp, LENGTH(sexp) returns some quite large integer
value. It seems like an "unitialized" value.

Can I safely assume, that an SEXP of type EXTPTRSXP can only contain a
single pointer value and never represent a vector (an array) of pointers? Or
should I maybe explicitly add something like

        SETLENGTH(sexp,1);

Best wishes from sunny Austria,

Thomas Baier

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to