mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
gh-140550: Use a bool for the Py_mod_gil value (GH-141519)
This needs a single bit, but was stored as a void* in the module struct. This didn't matter due to packing, but now that there's another bool in the struct, we can save a bit of memory by making md_gil a bool. Variables that changed type are renamed, to detect conflicts.
This commit is contained in:
parent
4885ecfbda
commit
a4dd66275b
4 changed files with 24 additions and 21 deletions
|
|
@ -30,7 +30,7 @@ typedef struct {
|
|||
PyObject *md_name;
|
||||
bool md_token_is_def; /* if true, `md_token` is the PyModuleDef */
|
||||
#ifdef Py_GIL_DISABLED
|
||||
void *md_gil;
|
||||
bool md_requires_gil;
|
||||
#endif
|
||||
Py_ssize_t md_state_size;
|
||||
traverseproc md_state_traverse;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue