From 6c28e44a359e9f6cf455ddff0009ca99406f7224 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 26 Feb 2019 11:58:47 -0700 Subject: Remove Python 2.4 and 2.5 support This removes all the remainings spots I could find that work around issues in Python 2.4 and 2.5. I don't have a good way to test that Python 2.6 still works. Tested by the buildbot. gdb/ChangeLog 2019-02-27 Tom Tromey * config.in, configure: Rebuild. * configure.ac (HAVE_LIBPYTHON2_4, HAVE_LIBPYTHON2_5): Never define. * python/py-value.c: Remove Python 2.4 workaround. * python/py-utils.c (gdb_pymodule_addobject): Remove Python 2.4 workaround. * python/py-type.c (convert_field, gdbpy_initialize_types): Remove Python 2.4 workaround. * python/python-internal.h: Remove Python 2.4 comment. (Py_ssize_t): Don't define. (PyVarObject_HEAD_INIT, Py_TYPE): Don't define. (gdb_Py_DECREF): Remove Python 2.4 workaround. (gdb_PyObject_GetAttrString, PyObject_GetAttrString): Remove. (gdb_PyObject_HasAttrString, PyObject_HasAttrString): Remove. * python/python.c (do_start_initialization): Remove Python 2.4 workaround. * python/py-prettyprint.c (class dummy_python_frame): Remove. (print_children): Remove Python 2.4 workaround. * python/py-inferior.c (buffer_procs): Remove Python 2.4 workaround. (CHARBUFFERPROC_NAME): Remove. * python/py-breakpoint.c (gdbpy_initialize_breakpoints): Remove Python 2.4 workaround. gdb/testsuite/ChangeLog 2019-02-27 Tom Tromey * lib/gdb.exp (skip_python_tests_prompt): Don't check for Python 2.4. * gdb.python/py-finish-breakpoint.exp: Remove Python 2.4 workaround. gdb/ChangeLog 2019-02-27 Tom Tromey * config.in, configure: Rebuild. * configure.ac (HAVE_LIBPYTHON2_4, HAVE_LIBPYTHON2_5): Never define. * python/py-value.c: Remove Python 2.4 workaround. * python/py-utils.c (gdb_pymodule_addobject): Remove Python 2.4 workaround. * python/py-type.c (convert_field, gdbpy_initialize_types): Remove Python 2.4 workaround. * python/python-internal.h: Remove Python 2.4 comment. (Py_ssize_t): Don't define. (PyVarObject_HEAD_INIT, Py_TYPE): Don't define. (gdb_Py_DECREF): Remove Python 2.4 workaround. (gdb_PyObject_GetAttrString, PyObject_GetAttrString): Remove. (gdb_PyObject_HasAttrString, PyObject_HasAttrString): Remove. * python/python.c (do_start_initialization): Remove Python 2.4 workaround. * python/py-prettyprint.c (class dummy_python_frame): Remove. (print_children): Remove Python 2.4 workaround. * python/py-inferior.c (buffer_procs): Remove Python 2.4 workaround. (CHARBUFFERPROC_NAME): Remove. * python/py-breakpoint.c (gdbpy_initialize_breakpoints): Remove Python 2.4 workaround. --- gdb/python/py-inferior.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'gdb/python/py-inferior.c') diff --git a/gdb/python/py-inferior.c b/gdb/python/py-inferior.c index ba769b3..72fbf6d 100644 --- a/gdb/python/py-inferior.c +++ b/gdb/python/py-inferior.c @@ -1002,20 +1002,11 @@ static PyBufferProcs buffer_procs = #else -/* Python doesn't provide a decent way to get compatibility here. */ -#if HAVE_LIBPYTHON2_4 -#define CHARBUFFERPROC_NAME getcharbufferproc -#else -#define CHARBUFFERPROC_NAME charbufferproc -#endif - static PyBufferProcs buffer_procs = { get_read_buffer, get_write_buffer, get_seg_count, - /* The cast here works around a difference between Python 2.4 and - Python 2.5. */ - (CHARBUFFERPROC_NAME) get_char_buffer + get_char_buffer }; #endif /* IS_PY3K */ -- cgit v1.1