diff mbox

[RFA,2/3] Make gdbpy_parameter static

Message ID 1465612923-24880-3-git-send-email-tom@tromey.com
State New
Headers show

Commit Message

Tom Tromey June 11, 2016, 2:42 a.m. UTC
While working on the next patch in this series, I noticed that
gdbpy_parameter did not need to be exported.  This makes it "static".

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

	* python/python.c (gdbpy_parameter): Now static.
	* python/python-internal.h (gdbpy_parameter): Don't declare.
---
 gdb/ChangeLog                | 5 +++++
 gdb/python/python-internal.h | 1 -
 gdb/python/python.c          | 2 +-
 3 files changed, 6 insertions(+), 2 deletions(-)

Comments

Pedro Alves June 17, 2016, 7 p.m. UTC | #1
On 06/11/2016 03:42 AM, Tom Tromey wrote:
> While working on the next patch in this series, I noticed that
> gdbpy_parameter did not need to be exported.  This makes it "static".
> 
> 2016-06-09  Tom Tromey  <tom@tromey.com>
> 
> 	* python/python.c (gdbpy_parameter): Now static.
> 	* python/python-internal.h (gdbpy_parameter): Don't declare.

This is obvious, IMO.

Thanks,
Pedro Alves
Tom Tromey June 24, 2016, 2:45 a.m. UTC | #2
>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:

>> 2016-06-09  Tom Tromey  <tom@tromey.com>
>> 
>> * python/python.c (gdbpy_parameter): Now static.
>> * python/python-internal.h (gdbpy_parameter): Don't declare.

Pedro> This is obvious, IMO.

Thanks, I'm pushing this one in.
It's independent of the other patches here.

Tom
diff mbox

Patch

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 04609c0..a64977e 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@ 
 2016-06-09  Tom Tromey  <tom@tromey.com>
 
+	* python/python.c (gdbpy_parameter): Now static.
+	* python/python-internal.h (gdbpy_parameter): Don't declare.
+
+2016-06-09  Tom Tromey  <tom@tromey.com>
+
 	* jit.c (jit_reader_load_command, jit_reader_unload_command): Call
 	reinit_frame_cache.
 
diff --git a/gdb/python/python-internal.h b/gdb/python/python-internal.h
index 6a2619c..7eb9aa4 100644
--- a/gdb/python/python-internal.h
+++ b/gdb/python/python-internal.h
@@ -375,7 +375,6 @@  PyObject *gdbpy_create_ptid_object (ptid_t ptid);
 PyObject *gdbpy_selected_thread (PyObject *self, PyObject *args);
 PyObject *gdbpy_selected_inferior (PyObject *self, PyObject *args);
 PyObject *gdbpy_string_to_argv (PyObject *self, PyObject *args);
-PyObject *gdbpy_parameter (PyObject *self, PyObject *args);
 PyObject *gdbpy_parameter_value (enum var_types type, void *var);
 char *gdbpy_parse_command_name (const char *name,
 				struct cmd_list_element ***base_list,
diff --git a/gdb/python/python.c b/gdb/python/python.c
index 1f1fece..9c4ddda 100644
--- a/gdb/python/python.c
+++ b/gdb/python/python.c
@@ -553,7 +553,7 @@  gdbpy_parameter_value (enum var_types type, void *var)
 /* A Python function which returns a gdb parameter's value as a Python
    value.  */
 
-PyObject *
+static PyObject *
 gdbpy_parameter (PyObject *self, PyObject *args)
 {
   struct gdb_exception except = exception_none;