Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFA] PR python/19819 - remove unused globals from py-xmethods.c
@ 2016-06-09 16:46 Tom Tromey
  2016-06-09 18:09 ` Joel Brobecker
  0 siblings, 1 reply; 2+ messages in thread
From: Tom Tromey @ 2016-06-09 16:46 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

PR python/19819 concerns some unused global variables in
py-xmethods.c.  This patch deletes the unused globals.

Tested by rebuilding.

2016-06-09  Tom Tromey  <tom@tromey.com>

	PR python/19819:
	* python/py-xmethods.c (invoke_method_name)
	(py_get_result_type_method_name, py_invoke_method_name): Remove.
	(gdbpy_initialize_xmethods): Don't initialize
	py_invoke_method_name, py_get_result_type_method_name.
---
 gdb/ChangeLog            |  8 ++++++++
 gdb/python/py-xmethods.c | 12 ------------
 2 files changed, 8 insertions(+), 12 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 9c09269..72f8a3e 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,11 @@
+2016-06-09  Tom Tromey  <tom@tromey.com>
+
+	PR python/19819:
+	* python/py-xmethods.c (invoke_method_name)
+	(py_get_result_type_method_name, py_invoke_method_name): Remove.
+	(gdbpy_initialize_xmethods): Don't initialize
+	py_invoke_method_name, py_get_result_type_method_name.
+
 2016-06-07  Simon Marchi  <simon.marchi@ericsson.com>
 
 	* mi/mi-interp.c (mi_record_changed): Add missing braces.
diff --git a/gdb/python/py-xmethods.c b/gdb/python/py-xmethods.c
index 58bb783..48205d8 100644
--- a/gdb/python/py-xmethods.c
+++ b/gdb/python/py-xmethods.c
@@ -31,13 +31,10 @@ static const char enabled_field_name[] = "enabled";
 static const char match_method_name[] = "match";
 static const char get_arg_types_method_name[] = "get_arg_types";
 static const char get_result_type_method_name[] = "get_result_type";
-static const char invoke_method_name[] = "invoke";
 static const char matchers_attr_str[] = "xmethods";
 
 static PyObject *py_match_method_name = NULL;
 static PyObject *py_get_arg_types_method_name = NULL;
-static PyObject *py_get_result_type_method_name = NULL;
-static PyObject *py_invoke_method_name = NULL;
 
 struct gdbpy_worker_data
 {
@@ -735,19 +732,10 @@ gdbpy_initialize_xmethods (void)
   if (py_match_method_name == NULL)
     return -1;
 
-  py_invoke_method_name = PyString_FromString (invoke_method_name);
-  if (py_invoke_method_name == NULL)
-    return -1;
-
   py_get_arg_types_method_name
     = PyString_FromString (get_arg_types_method_name);
   if (py_get_arg_types_method_name == NULL)
     return -1;
 
-  py_get_result_type_method_name
-    = PyString_FromString (get_result_type_method_name);
-  if (py_get_result_type_method_name == NULL)
-    return -1;
-
   return 1;
 }
-- 
2.5.5


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-06-09 18:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-09 16:46 [RFA] PR python/19819 - remove unused globals from py-xmethods.c Tom Tromey
2016-06-09 18:09 ` Joel Brobecker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox