| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
…h-suggesetions-128398 # Conflicts: # Lib/test/test_compile.py
There was a problem hiding this comment.
Thanks, LGTM. (I hadn't anticipated this simple idea would be this complex to implement, so I am very grateful for your effort!)
Sorry, something went wrong.
|
You're welcome! I've just seen that I've exposed the function using PyAPI_FUNC but I think an extern is sufficient. I'll amend this and then merge it. |
Sorry, something went wrong.
…e-128398.gJ2zIF.rst
…:picnixz/cpython into feat/core/async-with-suggesetions-128398
|
Mmh, the JIT tells me that it needs to be exported using PyAPI_FUNC. Well.. TIL. @brandtbucher Can you tell me why the JIT wouldn't work with extern here? (I'll change the symbol visibility but I'm interested in learning the reason) |
Sorry, something went wrong.
|
Sure! Very basically, the JIT code isn’t part of the same compilation unit as the rest of the interpreter, since it’s loaded at runtime. Because of that, the code it emits is like that of a third-party extension module. So this requires the symbols the JIT code “links” against to be visible at runtime. extern is only useful for code that’s linked as part of the interpreter itself. |
Sorry, something went wrong.
|
Oh I see. Thanks for the explanation. I'll add a small comment about the reason why we need PyAPI_FUNC then. |
Sorry, something went wrong.
|
Thanks. And you can just leave it in the internal API too (pycore_*). Just because we change the symbol visibility doesn’t mean it needs to be a supported API for third-party extensions. |
Sorry, something went wrong.
The new function is already in Include/internal/pycore_ceval.h. Were you thinking of another place? |
Sorry, something went wrong.
|
Nope, just making sure you knew it didn’t need to be moved! |
Sorry, something went wrong.
|
🎉🙏 |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.