summaryrefslogtreecommitdiff
path: root/gdb/parser-defs.h
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2012-07-06 14:42:09 +0000
committerTom Tromey <tromey@redhat.com>2012-07-06 14:42:09 +0000
commit1a7d0ce4eb4d724a3853500b45b379e746d7077a (patch)
treecc7af36758b02645c0165043e7ebe557131797d8 /gdb/parser-defs.h
parent16d0138401c61373637305e7ae4d6dd70574f0d2 (diff)
* parser-defs.h (type_stack, type_stack_size, type_stack_depth):
Remove. (struct type_stack): New. * parse.c (type_stack, type_stack_size, type_stack_depth): Remove. (type_stack): New global. (parse_exp_in_context, check_type_stack_depth) (insert_into_type_stack, insert_type, push_type, push_type_int) (insert_type_address_space, pop_type, pop_type_int) (_initialize_parse): Update.
Diffstat (limited to 'gdb/parser-defs.h')
-rw-r--r--gdb/parser-defs.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/gdb/parser-defs.h b/gdb/parser-defs.h
index aa600a19c4..de283d04fb 100644
--- a/gdb/parser-defs.h
+++ b/gdb/parser-defs.h
@@ -127,8 +127,18 @@ union type_stack_elt
enum type_pieces piece;
int int_val;
};
-extern union type_stack_elt *type_stack;
-extern int type_stack_depth, type_stack_size;
+
+/* The type stack is an instance of this structure. */
+
+struct type_stack
+{
+ /* Elements on the stack. */
+ union type_stack_elt *elements;
+ /* Current stack depth. */
+ int depth;
+ /* Allocated size of stack. */
+ int size;
+};
/* Helper function to initialize the expout, expout_size, expout_ptr
trio before it is used to store expression elements created during