Skip to content

Commit 31084be

Browse files
bpo-40750: Do not expand the new parser debug flags if Py_BUILD_CORE is not defined (GH-20393)
(cherry picked from commit deb4355) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
1 parent 82da2c3 commit 31084be

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Parser/pegen/parse.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// @generated by pegen.py from ./Grammar/python.gram
22
#include "pegen.h"
33

4-
#ifdef Py_DEBUG
4+
#if defined(Py_DEBUG) && defined(Py_BUILD_CORE)
55
extern int Py_DebugFlag;
66
#define D(x) if (Py_DebugFlag) x;
77
#else

Tools/peg_generator/pegen/c_generator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
EXTENSION_PREFIX = """\
3030
#include "pegen.h"
3131
32-
#ifdef Py_DEBUG
32+
#if defined(Py_DEBUG) && defined(Py_BUILD_CORE)
3333
extern int Py_DebugFlag;
3434
#define D(x) if (Py_DebugFlag) x;
3535
#else

0 commit comments

Comments
 (0)