From pperry at stern.nyu.edu  Fri Apr 14 23:27:42 2017
From: pperry at stern.nyu.edu (Patrick Perry)
Date: Fri, 14 Apr 2017 17:27:42 -0400
Subject: [Rd] potential bug in attribute handling for externalptr
Message-ID: <58F13ECE.8040009@stern.nyu.edu>

Is the following expected behavior?

 > mkext <- inline::cfunction(language="C", body='return 
R_MakeExternalPtr(NULL, install("tag"), R_NilValue);')
 > x <- mkext()
 > y <- x
 > attr(y, "foo") <- "bar"
 > attributes(x)
$foo
[1] "bar"

I would expect that modifying y's attributes should not affect x.

[Tested on R version 3.3.3 x86_64-apple-darwin16.4.0 (64-bit)]

Thanks,


Patrick



[Rd] potential bug in attribute handling for externalptr
Patrick Perry