Re: [Rpy] assignment to environments in rpy2

2009-02-04 Thread Laurent Gautier
Nathaniel Smith wrote: > On Tue, Feb 3, 2009 at 10:56 PM, laurent wrote: >> On Tue, 2009-02-03 at 13:30 -0800, Nathaniel Smith wrote: >>> why does EnvironmentSexp_ass_subscript (== >>> rpy2.rinterface.SexpEnvironment.__setitem__) copy the value it is >>> storing? >>> >>> PROTECT(sexp_copy = Rf_d

Re: [Rpy] assignment to environments in rpy2

2009-02-04 Thread Nathaniel Smith
On Tue, Feb 3, 2009 at 10:56 PM, laurent wrote: > On Tue, 2009-02-03 at 13:30 -0800, Nathaniel Smith wrote: >> why does EnvironmentSexp_ass_subscript (== >> rpy2.rinterface.SexpEnvironment.__setitem__) copy the value it is >> storing? >> >> PROTECT(sexp_copy = Rf_duplicate(sexp)); >> Rf_define

Re: [Rpy] assignment to environments in rpy2

2009-02-03 Thread laurent
On Tue, 2009-02-03 at 13:30 -0800, Nathaniel Smith wrote: > why does EnvironmentSexp_ass_subscript (== > rpy2.rinterface.SexpEnvironment.__setitem__) copy the value it is > storing? > > PROTECT(sexp_copy = Rf_duplicate(sexp)); > Rf_defineVar(sym, sexp_copy, rho_R); That's from the early de