bpo-40750: Do not expand the new parser debug flags if Py_BUILD_CORE is not defined (GH-20393)

(cherry picked from commit deb4355a37)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
This commit is contained in:
Miss Islington (bot) 2020-05-25 12:37:56 -07:00 committed by GitHub
parent 82da2c3eb4
commit 31084be618
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -1,7 +1,7 @@
// @generated by pegen.py from ./Grammar/python.gram
#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

View file

@ -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