Skip to content

Enhancement request: make pycore_cell.h compile cleanly under C++ #144490

Description

@yoney

This isn’t a “real issue” report, since pycore_cell.h (and the helpers it declares) are internal implementation details, so I understand they’re not part of the stable/public API, not guaranteed to be C++-compatible, and may change or disappear in future CPython versions. I’m still asking about this because the fix is very small.

While adapting CinderX to FT-Python, we include pycore_cell.h from a C++ (in the JIT/codegen path for LOAD_DEREF / STORE_DEREF). This currently fails to compile under C++ unless -fpermissive is used.

pycore_cell.h already has extern "C" guards, so it looks intended to be usable from C++ in at least some capacity. Would it be acceptable to add an explicit cast so it compiles cleanly under C++?``

Linked PRs

No activity

Activity on this issue will appear here.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    interpreter-core(Objects, Python, Grammar, and Parser dirs)type-featureA feature request or enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions