From 7e52705ee362001a8761461e9c4d49e3873568e0 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Mon, 20 Jan 2014 21:29:31 +0200 Subject: Issue #20315: Removed support for backward compatibility with early 2.x versions. --- Modules/_lsprof.c | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'Modules/_lsprof.c') diff --git a/Modules/_lsprof.c b/Modules/_lsprof.c index b0a226bfeb..4162be8340 100644 --- a/Modules/_lsprof.c +++ b/Modules/_lsprof.c @@ -455,7 +455,6 @@ profiler_callback(PyObject *self, PyFrameObject *frame, int what, PyTrace_RETURN event will be generated, so we don't need to handle it. */ -#ifdef PyTrace_C_CALL /* not defined in Python <= 2.3 */ /* the Python function 'frame' is issuing a call to the built-in function 'arg' */ case PyTrace_C_CALL: @@ -477,7 +476,6 @@ profiler_callback(PyObject *self, PyFrameObject *frame, int what, ((PyCFunctionObject *)arg)->m_ml); } break; -#endif default: break; @@ -667,13 +665,7 @@ setBuiltins(ProfilerObject *pObj, int nvalue) if (nvalue == 0) pObj->flags &= ~POF_BUILTINS; else if (nvalue > 0) { -#ifndef PyTrace_C_CALL - PyErr_SetString(PyExc_ValueError, - "builtins=True requires Python >= 2.4"); - return -1; -#else pObj->flags |= POF_BUILTINS; -#endif } return 0; } @@ -771,11 +763,7 @@ profiler_init(ProfilerObject *pObj, PyObject *args, PyObject *kw) PyObject *timer = NULL; double timeunit = 0.0; int subcalls = 1; -#ifdef PyTrace_C_CALL int builtins = 1; -#else - int builtins = 0; -#endif static char *kwlist[] = {"timer", "timeunit", "subcalls", "builtins", 0}; -- cgit v1.2.1