aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog10
-rw-r--r--gdb/python/py-arch.c5
-rw-r--r--gdb/python/py-breakpoint.c2
-rw-r--r--gdb/python/py-frame.c4
-rw-r--r--gdb/python/py-inferior.c4
-rw-r--r--gdb/python/py-type.c2
6 files changed, 17 insertions, 10 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 5f48a6e..23503ae 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,13 @@
+2019-01-02 Tom Tromey <tom@tromey.com>
+
+ * python/py-inferior.c (gdbpy_initialize_inferior): Fix
+ indentation.
+ * python/py-frame.c (frapy_older): Remove cast.
+ (frapy_newer): Likewise.
+ * python/py-breakpoint.c (local_setattro): Remove cast.
+ * python/py-arch.c (archpy_name): Remove local variable.
+ * python/py-type.c (gdbpy_lookup_type): Remove cast.
+
2019-01-02 Joel Brobecker <brobecker@adacore.com>
* unittests/basic_string_view/element_access/char/empty.cc:
diff --git a/gdb/python/py-arch.c b/gdb/python/py-arch.c
index 64f6563..cbdd881 100644
--- a/gdb/python/py-arch.c
+++ b/gdb/python/py-arch.c
@@ -97,14 +97,11 @@ archpy_name (PyObject *self, PyObject *args)
{
struct gdbarch *gdbarch = NULL;
const char *name;
- PyObject *py_name;
ARCHPY_REQUIRE_VALID (self, gdbarch);
name = (gdbarch_bfd_arch_info (gdbarch))->printable_name;
- py_name = PyString_FromString (name);
-
- return py_name;
+ return PyString_FromString (name);
}
/* Implementation of
diff --git a/gdb/python/py-breakpoint.c b/gdb/python/py-breakpoint.c
index 1d0c3d2..f41d88d 100644
--- a/gdb/python/py-breakpoint.c
+++ b/gdb/python/py-breakpoint.c
@@ -1196,7 +1196,7 @@ local_setattro (PyObject *self, PyObject *name, PyObject *v)
}
}
- return PyObject_GenericSetAttr ((PyObject *)self, name, v);
+ return PyObject_GenericSetAttr (self, name, v);
}
static gdb_PyGetSetDef breakpoint_object_getset[] = {
diff --git a/gdb/python/py-frame.c b/gdb/python/py-frame.c
index d7f62c2..88a50e7 100644
--- a/gdb/python/py-frame.c
+++ b/gdb/python/py-frame.c
@@ -416,7 +416,7 @@ frapy_older (PyObject *self, PyObject *args)
END_CATCH
if (prev)
- prev_obj = (PyObject *) frame_info_to_frame_object (prev);
+ prev_obj = frame_info_to_frame_object (prev);
else
{
Py_INCREF (Py_None);
@@ -449,7 +449,7 @@ frapy_newer (PyObject *self, PyObject *args)
END_CATCH
if (next)
- next_obj = (PyObject *) frame_info_to_frame_object (next);
+ next_obj = frame_info_to_frame_object (next);
else
{
Py_INCREF (Py_None);
diff --git a/gdb/python/py-inferior.c b/gdb/python/py-inferior.c
index 1c62a2c..b1b9e94 100644
--- a/gdb/python/py-inferior.c
+++ b/gdb/python/py-inferior.c
@@ -958,8 +958,8 @@ gdbpy_initialize_inferior (void)
if (PyType_Ready (&membuf_object_type) < 0)
return -1;
- return gdb_pymodule_addobject (gdb_module, "Membuf", (PyObject *)
- &membuf_object_type);
+ return gdb_pymodule_addobject (gdb_module, "Membuf",
+ (PyObject *) &membuf_object_type);
}
static gdb_PyGetSetDef inferior_object_getset[] =
diff --git a/gdb/python/py-type.c b/gdb/python/py-type.c
index 0196eb2..88770fc 100644
--- a/gdb/python/py-type.c
+++ b/gdb/python/py-type.c
@@ -1402,7 +1402,7 @@ gdbpy_lookup_type (PyObject *self, PyObject *args, PyObject *kw)
if (! type)
return NULL;
- return (PyObject *) type_to_type_object (type);
+ return type_to_type_object (type);
}
int