Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-144490: Fix C++ compatibility in pycore_cell.h#144482

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
yoney wants to merge1 commit intopython:main
base:main
Choose a base branch
Loading
fromyoney:pycore_cell

Conversation

@yoney
Copy link
Contributor

@yoneyyoney commentedFeb 4, 2026
edited by bedevere-appbot
Loading

The header already includes anextern "C" guard, suggesting it is intended to be C++ compatible. Adding a cast allows it to compile without-fpermissive.

cc:@colesbury

@picnixz
Copy link
Member

Do we do this kind of stuff for every calls? do we support-fpermissive flags? should we do it? I would prefer having an issue (maybe an old one) for other places that could be affected by this.

@colesbury
Copy link
Contributor

The internal headers (pycore_xxx.h) are often not C++ compatible, even though they all haveextern "C" { guards (often in the wrong places).

The change itself seems fine, but I'm curious how this came up. What's includingpycore_cell.h from C++?

@colesbury
Copy link
Contributor

To answer@picnixz, we generally do this sort of thing when people ask, especially when the changes are tiny, but we don't proactively make the internal header files C++ compatible.

picnixz and yoney reacted with thumbs up emoji

@yoney
Copy link
ContributorAuthor

What's including pycore_cell.h from C++?

This came up while I’m adaptingCinderX to FT-Python: C++ codegen path forLOAD_DEREF/STORE_DEREF ends up includingpycore_cell.h and calling the internal helpers as a good starting point (vs. generating the atomic-swap sequence right away). I initially worked around it with wrappers on our side, but since the header already hasextern "C" guards and the change is tiny, I wanted to check whether it’s okay to make this compile cleanly from C++.

Also agreed thatpycore_* headers aren’t guaranteed to be C++-compatible and may change; in CinderX we already adapt to internal changes per version.

colesbury reacted with thumbs up emoji

@colesbury
Copy link
Contributor

Ok, make sense. Can you open an issue like@picnixz asked? Also edit the PR title to associate it with the issue.

yoney reacted with thumbs up emoji

@yoneyyoney changed the titleFix C++ compatibility in _PyCell_GetStackRefgh-144490: Fix C++ compatibility in pycore_cell.hFeb 4, 2026
@yoney
Copy link
ContributorAuthor

Created the issue#144490

@picnixz,@colesbury: Thank you so much for the review.

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

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@yoney@picnixz@colesbury

[8]ページ先頭

©2009-2026 Movatter.jp