]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] gh-122270: Fix typos in the Py_DEBUG macro name (GH-122271) (GH-122276)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 25 Jul 2024 11:22:42 +0000 (13:22 +0200)
committerGitHub <noreply@github.com>
Thu, 25 Jul 2024 11:22:42 +0000 (11:22 +0000)
(cherry picked from commit 6c09b8de5c67406113e8d082e05c9587e35a852a)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Parser/pegen.c
Tools/peg_generator/peg_extension/peg_extension.c

index 5460fbb2ffee1402990cf8071693f19b376559e4..8c36c6779b962ecf22660bb785130f6f30411d21 100644 (file)
@@ -394,7 +394,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.
index 7df134b5ade8bbeb62927fca0d6a3126caa3ef23..d8545c9d0abc83004a711fd97c30154e8539046b 100644 (file)
@@ -108,7 +108,7 @@ error:
 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;