Open HenrikBengtsson opened 2 years ago
Most likely not possible without Rcpp adding support for this. The generated my_length()
function has no references whatsoever to the source code, or to Rcpp for that matter;
> my_length
function (x)
.Call(<pointer: 0x7f3f12609550>, x)
> str(my_length)
function (x)
> as.list(body(my_length))
[[1]]
.Call
[[2]]
<pointer: 0x7f3f12609550>
attr(,"class")
[1] "NativeSymbol"
[[3]]
x
> ptr <- body(my_length)[[2]]
> ptr
<pointer: 0x7f3f12609550>
attr(,"class")
[1] "NativeSymbol"
> str(ptr)
Class 'NativeSymbol' <externalptr>
From https://future.futureverse.org/articles/future-4-non-exportable-objects.html#package-rcpp:
This produces:
which holds an external reference pointer.
Can such an object be marshalled?