svn+ssh://pythondev@svn.python.org/python/trunk
........
r77892 | victor.stinner | 2010-01-31 23:32:15 +0100 (dim., 31 janv. 2010) | 4 lines
Issue #7819: Check sys.call_tracing() arguments types.
py3k was already patched by issue #3661.
........
out = p.stdout.read().strip()
self.assertEqual(out, '?')
+ def test_call_tracing(self):
+ self.assertEqual(sys.call_tracing(str, (2,)), "2")
+ self.assertRaises(TypeError, sys.call_tracing, str, 2)
+
class SizeofTest(unittest.TestCase):
Core and Builtins
-----------------
+- Issue #7819: Check sys.call_tracing() arguments types.
+
- Issue #7788: Fix an interpreter crash produced by deleting a list
slice with very large step value.
sys_call_tracing(PyObject *self, PyObject *args)
{
PyObject *func, *funcargs;
- if (!PyArg_UnpackTuple(args, "call_tracing", 2, 2, &func, &funcargs))
+ if (!PyArg_ParseTuple(args, "OO!:call_tracing", &func, &PyTuple_Type, &funcargs))
return NULL;
return _PyEval_CallTracing(func, funcargs);
}