Skip to content

Add SET_S4_OBJECT compatibility shim for newer R versions - #2

Merged
ricardovialle merged 1 commit into
masterfrom
claude/cool-albattani-kahuo2
Jun 10, 2026
Merged

Add SET_S4_OBJECT compatibility shim for newer R versions#2
ricardovialle merged 1 commit into
masterfrom
claude/cool-albattani-kahuo2

Conversation

@ricardovialle

Copy link
Copy Markdown
Member

R removed the SET_S4_OBJECT macro/function from the public API outside of USE_RINTERNALS builds, causing "use of undeclared identifier 'SET_S4_OBJECT'" on R 4.6 with Apple clang. Define it in terms of the still-public Rf_asS4, which sets the S4 bit on an object.

https://claude.ai/code/session_01ScgcJJ2KtznxpVtKtKE2NH

R removed the SET_S4_OBJECT macro/function from the public API
outside of USE_RINTERNALS builds, causing "use of undeclared
identifier 'SET_S4_OBJECT'" on R 4.6 with Apple clang. Define it
in terms of the still-public Rf_asS4, which sets the S4 bit on
an object.

https://claude.ai/code/session_01ScgcJJ2KtznxpVtKtKE2NH
Copilot AI review requested due to automatic review settings June 10, 2026 15:21
@ricardovialle
ricardovialle merged commit fbed783 into master Jun 10, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an R-version compatibility shim to keep the package building against newer R releases where SET_S4_OBJECT is no longer available in the public headers (outside USE_RINTERNALS).

Changes:

  • Define SET_S4_OBJECT when missing, implemented via Rf_asS4(..., TRUE, 0) to set the S4 bit using the stable API.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants