summaryrefslogtreecommitdiff
path: root/gdb/python/py-breakpoint.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2019-02-26 11:58:47 -0700
committerTom Tromey <tromey@adacore.com>2019-02-27 11:43:06 -0700
commit6c28e44a359e9f6cf455ddff0009ca99406f7224 (patch)
treed7d47c3142dcab10534e5b382fc7b233d12ac310 /gdb/python/py-breakpoint.c
parent2c3fc25dd18d3afb4b4cb494c4803fdfbf00ae9b (diff)
downloadbinutils-gdb-6c28e44a359e9f6cf455ddff0009ca99406f7224.tar.gz
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 <tromey@adacore.com> * 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 <tromey@adacore.com> * 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 <tromey@adacore.com> * 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.
Diffstat (limited to 'gdb/python/py-breakpoint.c')
-rw-r--r--gdb/python/py-breakpoint.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/gdb/python/py-breakpoint.c b/gdb/python/py-breakpoint.c
index f41d88dbf51..ba3b4f0fc38 100644
--- a/gdb/python/py-breakpoint.c
+++ b/gdb/python/py-breakpoint.c
@@ -1138,9 +1138,7 @@ gdbpy_initialize_breakpoints (void)
/* Add breakpoint types constants. */
for (i = 0; pybp_codes[i].name; ++i)
{
- if (PyModule_AddIntConstant (gdb_module,
- /* Cast needed for Python 2.4. */
- (char *) pybp_codes[i].name,
+ if (PyModule_AddIntConstant (gdb_module, pybp_codes[i].name,
pybp_codes[i].code) < 0)
return -1;
}
@@ -1148,9 +1146,7 @@ gdbpy_initialize_breakpoints (void)
/* Add watchpoint types constants. */
for (i = 0; pybp_watch_types[i].name; ++i)
{
- if (PyModule_AddIntConstant (gdb_module,
- /* Cast needed for Python 2.4. */
- (char *) pybp_watch_types[i].name,
+ if (PyModule_AddIntConstant (gdb_module, pybp_watch_types[i].name,
pybp_watch_types[i].code) < 0)
return -1;
}