diff mbox

[PR,python/19819] Remove unused static vars in py-xmethods.c

Message ID CAGyQ6gyAk8H-Hgb-aMN1mDmk2xrCBe1gKVvC5UanucddRpA0dg@mail.gmail.com
State New
Headers show

Commit Message

Siva Chandra Reddy March 18, 2016, 11:43 p.m. UTC
This can probably go in as obvious. Still, checking if I got everything correct.

gdb/ChangeLog:

2016-03-18  Siva Chandra Reddy  <sivachandra@google.com>

        PR python/19819
        * python/py-xmethods.c (invoke_method_name): Remove.
        (py_invoke_method_name): Likewise.

Comments

Yao Qi March 23, 2016, 4:36 p.m. UTC | #1
Siva Chandra <sivachandra@google.com> writes:

> gdb/ChangeLog:
>
> 2016-03-18  Siva Chandra Reddy  <sivachandra@google.com>
>
>         PR python/19819
>         * python/py-xmethods.c (invoke_method_name): Remove.
>         (py_invoke_method_name): Likewise.

Patch is OK.

XMethodWork.invoke was removed during the review, and invoke_method_name
is a leftover of that removal.  If you give such information in the
mail, the review will be easier for me.
diff mbox

Patch

diff --git a/gdb/python/py-xmethods.c b/gdb/python/py-xmethods.c
index 58bb783..1e3df35 100644
--- a/gdb/python/py-xmethods.c
+++ b/gdb/python/py-xmethods.c
@@ -31,13 +31,11 @@  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,10 +733,6 @@  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)