Uh oh!
There was an error while loading. Please reload this page.
gh-111956: Add thread-safe one-time initialization. - #111960
Conversation
The one-time initialization (`_PyOnceFlag`) is used in two places: * `Python/Python-ast.c` * `Python/getargs.c`
colesbury
commented
Nov 10, 2023
@ericsnowcurrently, when you have some time, would you please look at this? One question: I'm unsure of what |
ericsnowcurrently
left a comment
There was a problem hiding this comment.
Aside from one small thing, LGTM.
Uh oh!
There was an error while loading. Please reload this page.
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
ericsnowcurrently
commented
Nov 15, 2023
The typical convention in the case of success vs. error is -1 for error and 0 for success. The 0/1 convention is more for true/false situations. |
colesbury
commented
Nov 15, 2023
@ericsnowcurrently that makes sense. I'll change it to -1=error, 0=success. |
colesbury
commented
Nov 15, 2023
@ericsnowcurrently, I changed the code to use |
ericsnowcurrently
commented
Nov 16, 2023
I'll merge this in the morning if no one beats me to it. |
The one-time initialization (
_PyOnceFlag) is used in two places:Python/Python-ast.cPython/getargs.c