Commit ed0b87d7 authored by Victor Stinner's avatar Victor Stinner

Fix the C definition of the sys._debugmallocstats() function: the function has

no parameter
parent 36e96b87
...@@ -665,6 +665,9 @@ class SysModuleTest(unittest.TestCase): ...@@ -665,6 +665,9 @@ class SysModuleTest(unittest.TestCase):
ret, out, err = assert_python_ok(*args) ret, out, err = assert_python_ok(*args)
self.assertIn(b"free PyDictObjects", err) self.assertIn(b"free PyDictObjects", err)
# The function has no parameter
self.assertRaises(TypeError, sys._debugmallocstats, True)
@unittest.skipUnless(hasattr(sys, "getallocatedblocks"), @unittest.skipUnless(hasattr(sys, "getallocatedblocks"),
"sys.getallocatedblocks unavailable on this build") "sys.getallocatedblocks unavailable on this build")
def test_getallocatedblocks(self): def test_getallocatedblocks(self):
......
...@@ -1186,7 +1186,7 @@ static PyMethodDef sys_methods[] = { ...@@ -1186,7 +1186,7 @@ static PyMethodDef sys_methods[] = {
{"settrace", sys_settrace, METH_O, settrace_doc}, {"settrace", sys_settrace, METH_O, settrace_doc},
{"gettrace", sys_gettrace, METH_NOARGS, gettrace_doc}, {"gettrace", sys_gettrace, METH_NOARGS, gettrace_doc},
{"call_tracing", sys_call_tracing, METH_VARARGS, call_tracing_doc}, {"call_tracing", sys_call_tracing, METH_VARARGS, call_tracing_doc},
{"_debugmallocstats", sys_debugmallocstats, METH_VARARGS, {"_debugmallocstats", sys_debugmallocstats, METH_NOARGS,
debugmallocstats_doc}, debugmallocstats_doc},
{NULL, NULL} /* sentinel */ {NULL, NULL} /* sentinel */
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment