From jeroen at berkeley.edu  Sat Apr 15 14:57:34 2017
From: jeroen at berkeley.edu (Jeroen Ooms)
Date: Sat, 15 Apr 2017 14:57:34 +0200
Subject: [Rd] potential bug in attribute handling for externalptr
In-Reply-To: <58F13ECE.8040009@stern.nyu.edu>
References: <58F13ECE.8040009@stern.nyu.edu>
Message-ID: <CABFfbXtYLEgSyLLPjc_bTbGs41Fcxagnpcf0UBUpKMxnnXhyUw@mail.gmail.com>

On Fri, Apr 14, 2017 at 11:27 PM, Patrick Perry <pperry at stern.nyu.edu> wrote:
> Is the following expected behavior? I would expect that modifying y's attributes should not affect x.

Yes this is expected. Environments and external-ptr objects are never
copied on assignment, hence in your example 'x' and 'y' are the same
object. See e.g. ?reg.finalizer or section 5.13 of "writing r
extensions" on external pointers and weak references.



[Rd] potential bug in attribute handling for externalptr
Jeroen Ooms