Skip to content
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

gh-93103: Parser uses PyConfig.parser_debug instead of Py_DebugFlag #93106

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented May 23, 2022

Replace deprecated Py_DebugFlag with PyConfig.parser_debug in the
parser.

…Flag

Replace deprecated Py_DebugFlag with PyConfig.parser_debug in the
parser.
Copy link
Member

@pablogsal pablogsal left a comment

LGTM but left one comment

@@ -32,7 +32,7 @@
#include "pegen.h"
#if defined(Py_DEBUG) && defined(Py_BUILD_CORE)
# define D(x) if (Py_DebugFlag) x;
# define D(x) if (_Py_GetConfig()->parser_debug) { x; }
Copy link
Member

@pablogsal pablogsal May 23, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if this makes the debug run slower due to the function call (is everywhere)🤔

Could you do a quick check please?

Copy link
Member Author

@vstinner vstinner May 23, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change only affects the debug build. I don't know how to measure the parser performance. Any suggestion?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants