summaryrefslogtreecommitdiffstats
path: root/Tools/peg_generator
diff options
context:
space:
mode:
authorAmmar Askar <ammar@ammaraskar.com>2020-05-26 04:33:35 (GMT)
committerGitHub <noreply@github.com>2020-05-26 04:33:35 (GMT)
commita2bbedc8b18c001d2f9e702e6e678efbb2990daa (patch)
treed35ba2b5614b3effc11a76a821ee8bb574b9233f /Tools/peg_generator
parent4a0ac42c52a4d9ccfb0a78ab02aa03172ce0e31a (diff)
downloadcpython-a2bbedc8b18c001d2f9e702e6e678efbb2990daa.zip
cpython-a2bbedc8b18c001d2f9e702e6e678efbb2990daa.tar.gz
cpython-a2bbedc8b18c001d2f9e702e6e678efbb2990daa.tar.bz2
Fix peg_generator compiler warnings under MSVC (GH-20405)
Diffstat (limited to 'Tools/peg_generator')
-rw-r--r--Tools/peg_generator/peg_extension/peg_extension.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Tools/peg_generator/peg_extension/peg_extension.c b/Tools/peg_generator/peg_extension/peg_extension.c
index fb552ee..96d3a52 100644
--- a/Tools/peg_generator/peg_extension/peg_extension.c
+++ b/Tools/peg_generator/peg_extension/peg_extension.c
@@ -96,21 +96,21 @@ error:
}
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) {
@@ -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);