Skip to content

Commit

Permalink
[3.13] gh-122270: Fix typos in the Py_DEBUG macro name (GH-122271) (G…
Browse files Browse the repository at this point in the history
…H-122275)

(cherry picked from commit 6c09b8d)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
  • Loading branch information
miss-islington and serhiy-storchaka authored Jul 25, 2024
1 parent 984f8aa commit 83bfc5b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Parser/pegen.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions Tools/peg_generator/peg_extension/peg_extension.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit 83bfc5b

Please sign in to comment.