-
-
Notifications
You must be signed in to change notification settings - Fork 30.4k
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gh-122584: Import mimalloc headers in a C++ context #122587
Conversation
This seems like an okay workaround , but I think the underlying problems is that we really shouldn't be including headers under an It can (and has) caused problems with system headers too. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice workaround.
I tried modifying the 123 header files in Include/internal/ to move #include
outside extern "C" { ... }
. It's a lot of work, it will be hard to maintain in the future, I don't think that it's worth it.
What's the status here? This would also resolve one of the remaining issues with making mypyc compatible with |
Thanks @mdboom for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13. |
…22587) (cherry picked from commit 1dad23e) Co-authored-by: Michael Droettboom <[email protected]>
GH-123035 is a backport of this pull request to the 3.13 branch. |
The vendored mimalloc headers are designed to be used in a C++ context if imported from C++. Therefore, we should switch the context back to C++ when using a C++ compiler here. This seems like the most future-proof fix, because otherwise we would need to be careful what context we import
pycore_mimalloc.h
from.