Make increase_expout_size static
authorTom Tromey <tom@tromey.com>
Sun, 24 Mar 2019 14:25:58 +0000 (08:25 -0600)
committerTom Tromey <tom@tromey.com>
Fri, 5 Apr 2019 01:55:10 +0000 (19:55 -0600)
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-04  Tom Tromey  <tom@tromey.com>

* parser-defs.h (increase_expout_size): Don't declare.
* parse.c (increase_expout_size): Now static.

gdb/ChangeLog
gdb/parse.c
gdb/parser-defs.h

index 4a49d32..36a8e24 100644 (file)
@@ -1,3 +1,8 @@
+2019-04-04  Tom Tromey  <tom@tromey.com>
+
+       * parser-defs.h (increase_expout_size): Don't declare.
+       * parse.c (increase_expout_size): Now static.
+
 2019-04-04  Thomas Schwinge  <thomas@codesourcery.com>
 
        * gnu-nat.c (gnu_nat_target::wait): Fix
index 63cbc74..6716597 100644 (file)
@@ -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)
index 26e0a83..bb0d52b 100644 (file)
@@ -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 */