A few additions to external_pointer

Open
#287 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
38/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
cpp, r
Domain
tooling

Research direction

Locate the external_pointer definition and review how cpp11 currently wraps R external-pointer operations. Check the existing conversion operators and wrappers before assessing operator sexp() and R_SetExternalPtrProtected. Done means both requested interfaces are consistently exposed without mixing direct R internal calls, with relevant tests updated or added if the project has coverage for them.

Written by the indexing model from the issue text.

Description

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.

Dominant language
C++
Stars
224
Forks
52
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from r-lib/cpp11

All issues in r-lib/cpp11

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.