summaryrefslogtreecommitdiffstats
path: root/Tools/peg_generator
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2020-05-25 19:37:56 (GMT)
committerGitHub <noreply@github.com>2020-05-25 19:37:56 (GMT)
commit31084be618b6b7602d58e4d21ceef2e65ed8ef1b (patch)
treefa78579592127c86ca7190caed2af07079c47ff7 /Tools/peg_generator
parent82da2c3eb4d69b55d9e300ab5d9c1d22bd09b9cd (diff)
downloadcpython-31084be618b6b7602d58e4d21ceef2e65ed8ef1b.zip
cpython-31084be618b6b7602d58e4d21ceef2e65ed8ef1b.tar.gz
cpython-31084be618b6b7602d58e4d21ceef2e65ed8ef1b.tar.bz2
bpo-40750: Do not expand the new parser debug flags if Py_BUILD_CORE is not defined (GH-20393)
(cherry picked from commit deb4355a37e41edf1199920789fe9572c1fb43c2) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Diffstat (limited to 'Tools/peg_generator')
-rw-r--r--Tools/peg_generator/pegen/c_generator.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Tools/peg_generator/pegen/c_generator.py b/Tools/peg_generator/pegen/c_generator.py
index ff7e75a..8bc2391 100644
--- a/Tools/peg_generator/pegen/c_generator.py
+++ b/Tools/peg_generator/pegen/c_generator.py
@@ -29,7 +29,7 @@ from pegen.parser_generator import ParserGenerator
EXTENSION_PREFIX = """\
#include "pegen.h"
-#ifdef Py_DEBUG
+#if defined(Py_DEBUG) && defined(Py_BUILD_CORE)
extern int Py_DebugFlag;
#define D(x) if (Py_DebugFlag) x;
#else