You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Nick left a comment in pydebug.h
/* These global variable are defined in pylifecycle.c /
/ XXX (ncoghlan): move these declarations to pylifecycle.h? */
I have checked those global variables are not only debug variables and they are defined in [Python/initconfig.c](https://github.com/python/cpython/blob/main/Python/initconfig.c) now.
If I understand clearly, those declarations should moved to [Include/cpython/initconfig.h](https://github.com/python/cpython/blob/main/Include/cpython/initconfig.h) and pydebug.h could be deleted.
They are used to populate PyConfig (PEP-587). At startup, the PyConfig is copied into these global configuration variables. After the Python initilization, they are no longer read, but PyConfig (tstate->interp->config) is read instead.
You can simply remove the two lines comment from pydebug.h.
Activity
shihai1991 commentedon May 5, 2020
Nick left a comment in
pydebug.h/* These global variable are defined in pylifecycle.c /
/ XXX (ncoghlan): move these declarations to pylifecycle.h? */
I have checked those global variables are not only debug variables and they are defined in
[Python/initconfig.c](https://github.com/python/cpython/blob/main/Python/initconfig.c)now.If I understand clearly, those declarations should moved to
[Include/cpython/initconfig.h](https://github.com/python/cpython/blob/main/Include/cpython/initconfig.h)andpydebug.hcould be deleted.ref: d600951
vstinner commentedon May 5, 2020
Global configuration variables are part of the C API. They are now documented:
https://docs.python.org/dev/c-api/init.html#global-configuration-variables
They are used to populate PyConfig (PEP-587). At startup, the PyConfig is copied into these global configuration variables. After the Python initilization, they are no longer read, but PyConfig (tstate->interp->config) is read instead.
You can simply remove the two lines comment from pydebug.h.
shihai1991 commentedon May 5, 2020
Got it, thanks for your explanation, victor ;)
miss-islington commentedon May 5, 2020
New changeset 6351d9e by Hai Shi in branch 'master':
bpo-40520: Remove redundant comment in pydebug.h (GH-19931)
6351d9e
[-]port the declartions in pydebug.h to initconfig.h[/-][+]Remove redundant comment in pydebug.h[/+][-]port the declartions in pydebug.h to initconfig.h[/-][+]Remove redundant comment in pydebug.h[/+]corona10 commentedon May 5, 2020
Thanks hai shi :)
shihai1991 commentedon May 5, 2020
Thanks, Dong-hee Na ;)