Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions Parser/tokenizer.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@
|| c == '_'\
|| (c >= 128))

extern char *PyOS_Readline(FILE *, FILE *, const char *);
/* Return malloc'ed string including trailing \n;
empty malloc'ed string for EOF;
NULL if interrupted */

/* Don't ever change this -- it would break the portability of Python code */
#define TABSIZE 8
Expand Down
8 changes: 4 additions & 4 deletions Tools/peg_generator/peg_extension/peg_extension.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,21 +96,21 @@ parse_string(PyObject *self, PyObject *args, PyObject *kwds)
}

static PyObject *
clear_memo_stats()
clear_memo_stats(PyObject *Py_UNUSED(self), PyObject *Py_UNUSED(ignored))
{
_PyPegen_clear_memo_statistics();
Py_RETURN_NONE;
}

static PyObject *
get_memo_stats()
get_memo_stats(PyObject *Py_UNUSED(self), PyObject *Py_UNUSED(ignored))
{
return _PyPegen_get_memo_statistics();
}

// TODO: Write to Python's sys.stdout instead of C's stdout.
static PyObject *
dump_memo_stats()
dump_memo_stats(PyObject *Py_UNUSED(self), PyObject *Py_UNUSED(ignored))
{
PyObject *list = _PyPegen_get_memo_statistics();
if (list == NULL) {
Expand All @@ -124,7 +124,7 @@ dump_memo_stats()
break;
}
if (count > 0) {
printf("%4ld %9ld\n", i, count);
printf("%4zd %9ld\n", i, count);
}
}
Py_DECREF(list);
Expand Down