You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
"template with C linkage" error when including "pycore_interp.h" from C++ file #122584
Tested on official docker image python3.13.0b4-bullseye. pycore_interp.h causes compiler error when included from C++ file. No problem when included from C file.
Activity
mdboom commentedon Aug 1, 2024
It looks like
mimalloc.his designed to be importable from either a C++ or C context, so it shouldn't be imported from inside anextern "C" { }block.This fixes the issue, but there might be other cases of this, and it's not clear how to enforce that we don't fall in this trap again.
pythongh-122584: Import mimalloc headers in a C++ context
gh-122584: Import mimalloc headers in a C++ context (#122587)
pythongh-122584: Import mimalloc headers in a C++ context (pythonGH-1…
[3.13] gh-122584: Import mimalloc headers in a C++ context (GH-122587) (
pythongh-122584: Import mimalloc headers in a C++ context (python#122587
sklam commentedon Oct 24, 2024
I can confirm that the original problem is resolved.
vstinner commentedon Oct 24, 2024
I'm now curious. Why do you need to access the internal C API, pycore_interp.h? What's your use case?