mirror of https://github.com/python/cpython
gh-122270: Fix typos in the Py_DEBUG macro name (GH-122271)
This commit is contained in:
parent
dc07f65a53
commit
6c09b8de5c
|
@ -341,7 +341,7 @@ _PyPegen_is_memoized(Parser *p, int type, void *pres)
|
||||||
|
|
||||||
for (Memo *m = t->memo; m != NULL; m = m->next) {
|
for (Memo *m = t->memo; m != NULL; m = m->next) {
|
||||||
if (m->type == type) {
|
if (m->type == type) {
|
||||||
#if defined(PY_DEBUG)
|
#if defined(Py_DEBUG)
|
||||||
if (0 <= type && type < NSTATISTICS) {
|
if (0 <= type && type < NSTATISTICS) {
|
||||||
long count = m->mark - p->mark;
|
long count = m->mark - p->mark;
|
||||||
// A memoized negative result counts for one.
|
// A memoized negative result counts for one.
|
||||||
|
|
|
@ -108,7 +108,7 @@ error:
|
||||||
static PyObject *
|
static PyObject *
|
||||||
clear_memo_stats(PyObject *Py_UNUSED(self), PyObject *Py_UNUSED(ignored))
|
clear_memo_stats(PyObject *Py_UNUSED(self), PyObject *Py_UNUSED(ignored))
|
||||||
{
|
{
|
||||||
#if defined(PY_DEBUG)
|
#if defined(Py_DEBUG)
|
||||||
_PyPegen_clear_memo_statistics();
|
_PyPegen_clear_memo_statistics();
|
||||||
#endif
|
#endif
|
||||||
Py_RETURN_NONE;
|
Py_RETURN_NONE;
|
||||||
|
@ -117,7 +117,7 @@ clear_memo_stats(PyObject *Py_UNUSED(self), PyObject *Py_UNUSED(ignored))
|
||||||
static PyObject *
|
static PyObject *
|
||||||
get_memo_stats(PyObject *Py_UNUSED(self), PyObject *Py_UNUSED(ignored))
|
get_memo_stats(PyObject *Py_UNUSED(self), PyObject *Py_UNUSED(ignored))
|
||||||
{
|
{
|
||||||
#if defined(PY_DEBUG)
|
#if defined(Py_DEBUG)
|
||||||
return _PyPegen_get_memo_statistics();
|
return _PyPegen_get_memo_statistics();
|
||||||
#else
|
#else
|
||||||
Py_RETURN_NONE;
|
Py_RETURN_NONE;
|
||||||
|
@ -128,7 +128,7 @@ get_memo_stats(PyObject *Py_UNUSED(self), PyObject *Py_UNUSED(ignored))
|
||||||
static PyObject *
|
static PyObject *
|
||||||
dump_memo_stats(PyObject *Py_UNUSED(self), PyObject *Py_UNUSED(ignored))
|
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();
|
PyObject *list = _PyPegen_get_memo_statistics();
|
||||||
if (list == NULL) {
|
if (list == NULL) {
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
Loading…
Reference in New Issue