Hello All,

Im sure this question is basic but Im just getting started with R/c++
calls.

I would like to use an standard template library (STL) map to organize some
SEXP types in my program.  The map is map<int, SEXP> paramMap.  To insert
values into the value portion of this map I make a call to the function
getListElement (as defined on page 52 in Writing R Extensions). So the
insert looks like:

paramMap.insert(pair<int,SEXP>( some int, getListElement( some args )));

This statement is set in a for loop so that several map elements are
inserted.  On insert the return from getListElement is copied.

My question is, do I need to somehow PROTECT the SEXP value portion of this
map?  Or this this not necessary?

Thanks-
Andy

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

Reply via email to