]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-122270: Fix typos in the Py_DEBUG macro name (GH-122271)
authorSerhiy Storchaka <storchaka@gmail.com>
Thu, 25 Jul 2024 11:04:22 +0000 (14:04 +0300)
committerGitHub <noreply@github.com>
Thu, 25 Jul 2024 11:04:22 +0000 (14:04 +0300)
Parser/pegen.c
Tools/peg_generator/peg_extension/peg_extension.c

index 6efb5477c7b80f53984f7c1de5ee9e55d9bcffaa..ac428be0958bdf0c11e7625576d01868ad4556c7 100644 (file)
@@ -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.
index b081240ffff017a422f5e5a17cdb2a72e671d010..1587d53d59472ed6e997acaf4ebd58184043fe0a 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;