r-lib / cpp11

cpp11 helps you to interact with R objects using C++ code.
https://cpp11.r-lib.org/
Other
193 stars 46 forks source link

A few additions to external_pointer #287

Open thk686 opened 1 year ago

thk686 commented 1 year ago

In a few cases, it would make code slightly cleaner if external_pointer defined operator sexp(). It would also be nice to expose R_SetExternalPtrProtected as I use it a lot in a current project. The only reasoning for this is to expose only cpp11 code and not a mix of cpp11 and R internal functions, so it's not very important. More stylistic I suppose. I can make those changes in a fork unless there are reasons not too.