| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
I'm OK with this change. The motivation for adding it seems reasonable. I'll let @ericsnowcurrently review it properly, but I skimmed through the code and I like the approach.
Sorry, something went wrong.
There was a problem hiding this comment.
Some minor remarks after a quick look: please align the naming with PEP-7 and use Py (not PY) prefixes for the macros.
Sorry, something went wrong.
|
@ericsnowcurrently Am I doing this wrong, Having an issue with Check if generated files are up to date I followed the example for the other watcher checks and they use the same style globals. Also I can't run the check locally it on my mac it doesn't seem to like clang. |
Sorry, something went wrong.
Try copying similar entries in Tools/c-analyzer/cpython/ignored.tsv and then editing them to match the new variables.
Yeah, sorry, this is definitely a gap. |
Sorry, something went wrong.
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
| static void notify_context_watchers(PyContextEvent event, PyContext *ctx) | ||
| { | ||
| assert(Py_REFCNT(ctx) > 0); | ||
| PyInterpreterState *interp = _PyInterpreterState_GET(); |
There was a problem hiding this comment.
FWIW you can get interp from tstate which is already known, it would have avoided one more tls read which is slow on msvc.
Sorry, something went wrong.
There was a problem hiding this comment.
Sorry. We’ll fix it tomorrow. Any other concerns?
Sorry, something went wrong.
| } PyContextEvent; | ||
|
|
||
| /* | ||
| * A Callback to clue in non-python contexts impls about a |
There was a problem hiding this comment.
I don't understand this comment, what is meant by clue in? Also what is change in active python context?
Sorry, something went wrong.
| * A Callback to clue in non-python contexts impls about a | ||
| * change in the active python context. | ||
| * | ||
| * The callback is invoked with the event and a reference to = |
There was a problem hiding this comment.
Remove the =, it adds no useful info and is confusing.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This PR implements gh-119333, allowing for setting a callback function on PyContext_Enter and PyContext_Exit from the c-api
Co-authored-by: @itamaro
📚 Documentation preview 📚: https://cpython-previews--119335.org.readthedocs.build/