This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 01/13] Make increase_expout_size static
- From: Tom Tromey <tom at tromey dot com>
- To: gdb-patches at sourceware dot org
- Cc: Tom Tromey <tom at tromey dot com>
- Date: Tue, 2 Apr 2019 19:37:53 -0600
- Subject: [PATCH 01/13] Make increase_expout_size static
- References: <20190403013805.11978-1-tom@tromey.com>
increase_expout_size is only called from parse.c, and probably only
should be. This makes it "static". Tested by rebuilding.
gdb/ChangeLog
2019-04-02 Tom Tromey <tom@tromey.com>
* parser-defs.h (increase_expout_size): Don't declare.
* parse.c (increase_expout_size): Now static.
---
gdb/ChangeLog | 5 +++++
gdb/parse.c | 9 +++++++--
gdb/parser-defs.h | 6 ------
3 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/gdb/parse.c b/gdb/parse.c
index 63cbc746aaa..671659742dd 100644
--- a/gdb/parse.c
+++ b/gdb/parse.c
@@ -119,6 +119,9 @@ static expression_up parse_exp_in_context (const char **, CORE_ADDR,
int, int *,
innermost_block_tracker_types);
+static void increase_expout_size (struct parser_state *ps, size_t lenelt);
+
+
/* Documented at it's declaration. */
void
@@ -1822,9 +1825,11 @@ exp_uses_objfile (struct expression *exp, struct objfile *objfile)
return exp_iterate (exp, exp_uses_objfile_iter, objfile);
}
-/* See definition in parser-defs.h. */
+/* Reallocate the `expout' pointer inside PS so that it can accommodate
+ at least LENELT expression elements. This function does nothing if
+ there is enough room for the elements. */
-void
+static void
increase_expout_size (struct parser_state *ps, size_t lenelt)
{
if ((ps->expout_ptr + lenelt) >= ps->expout_size)
diff --git a/gdb/parser-defs.h b/gdb/parser-defs.h
index 26e0a836c11..bb0d52bb05c 100644
--- a/gdb/parser-defs.h
+++ b/gdb/parser-defs.h
@@ -426,11 +426,5 @@ extern int exp_uses_objfile (struct expression *exp, struct objfile *objfile);
extern void mark_completion_tag (enum type_code, const char *ptr,
int length);
-/* Reallocate the `expout' pointer inside PS so that it can accommodate
- at least LENELT expression elements. This function does nothing if
- there is enough room for the elements. */
-
-extern void increase_expout_size (struct parser_state *ps, size_t lenelt);
-
#endif /* PARSER_DEFS_H */
--
2.17.2