https://github.com/python/cpython/commit/6c09b8de5c67406113e8d082e05c9587e35a852a
commit: 6c09b8de5c67406113e8d082e05c9587e35a852a
branch: main
author: Serhiy Storchaka <[email protected]>
committer: serhiy-storchaka <[email protected]>
date: 2024-07-25T14:04:22+03:00
summary:
gh-122270: Fix typos in the Py_DEBUG macro name (GH-122271)
files:
M Parser/pegen.c
M Tools/peg_generator/peg_extension/peg_extension.c
diff --git a/Parser/pegen.c b/Parser/pegen.c
index 6efb5477c7b80f..ac428be0958bdf 100644
--- a/Parser/pegen.c
+++ b/Parser/pegen.c
@@ -341,7 +341,7 @@ _PyPegen_is_memoized(Parser *p, int type, void *pres)
for (Memo *m = t->memo; m != NULL; m = m->next) {
if (m->type == type) {
-#if defined(PY_DEBUG)
+#if defined(Py_DEBUG)
if (0 <= type && type < NSTATISTICS) {
long count = m->mark - p->mark;
// A memoized negative result counts for one.
diff --git a/Tools/peg_generator/peg_extension/peg_extension.c
b/Tools/peg_generator/peg_extension/peg_extension.c
index b081240ffff017..1587d53d59472e 100644
--- a/Tools/peg_generator/peg_extension/peg_extension.c
+++ b/Tools/peg_generator/peg_extension/peg_extension.c
@@ -108,7 +108,7 @@ parse_string(PyObject *self, PyObject *args, PyObject *kwds)
static PyObject *
clear_memo_stats(PyObject *Py_UNUSED(self), PyObject *Py_UNUSED(ignored))
{
-#if defined(PY_DEBUG)
+#if defined(Py_DEBUG)
_PyPegen_clear_memo_statistics();
#endif
Py_RETURN_NONE;
@@ -117,7 +117,7 @@ clear_memo_stats(PyObject *Py_UNUSED(self), PyObject
*Py_UNUSED(ignored))
static PyObject *
get_memo_stats(PyObject *Py_UNUSED(self), PyObject *Py_UNUSED(ignored))
{
-#if defined(PY_DEBUG)
+#if defined(Py_DEBUG)
return _PyPegen_get_memo_statistics();
#else
Py_RETURN_NONE;
@@ -128,7 +128,7 @@ get_memo_stats(PyObject *Py_UNUSED(self), PyObject
*Py_UNUSED(ignored))
static PyObject *
dump_memo_stats(PyObject *Py_UNUSED(self), PyObject *Py_UNUSED(ignored))
{
-#if defined(PY_DEBUG)
+#if defined(Py_DEBUG)
PyObject *list = _PyPegen_get_memo_statistics();
if (list == NULL) {
return NULL;
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]