-
-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
bpo-30860: Consolidate stateful runtime globals. #3397
bpo-30860: Consolidate stateful runtime globals. #3397
Conversation
Include/ceval.h
Outdated
@@ -93,7 +93,12 @@ PyAPI_FUNC(int) Py_GetRecursionLimit(void); | |||
PyThreadState_GET()->overflowed = 0; \ | |||
} while(0) | |||
PyAPI_FUNC(int) _Py_CheckRecursiveCall(const char *where); | |||
PyAPI_DATA(int) _Py_CheckRecursionLimit; |
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.
This is in the stable API, no?
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.
:( I'm going to revert the _Py_CheckRecursionLimit part of the change for now and circle back after this patch lands.
Include/internal/ceval.h
Outdated
extern "C" { | ||
#endif | ||
|
||
#include <ceval.h> |
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.
These sorts of includes should probably be quoted and qualified "internal/ceval.h"
.
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.
fixed
Python/pystate.c
Outdated
void | ||
_PyRuntimeState_Init(_PyRuntimeState *runtime) | ||
{ | ||
_PyRuntimeState initial = {}; |
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.
Empty initializers aren't standard. You should probably just memset
it to 0.
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.
fixed
Parser/pgenmain.c
Outdated
|
||
int Py_DebugFlag; | ||
int Py_VerboseFlag; | ||
int Py_IgnoreEnvironmentFlag; | ||
struct pyruntimestate _PyRuntime = {}; |
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.
ditto on empty initializer list
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.
fixed
feb5752
to
632e760
Compare
6bc2c67
to
1c85e28
Compare
8f47c44
to
73f8ef1
Compare
73f8ef1
to
f1f10ff
Compare
Resolve conflicts: 2ebc5ce bpo-30860: Consolidate stateful runtime globals. (python#3397)
(trying again; see #2594)
Other globals are excluded (see globals.txt and check-c-globals.py).
https://bugs.python.org/issue30860