some function decl stuff
[official-gcc.git] / gcc / python / py-vec.h
blobe1508e2434bb433933bb6ba775b8a93b0ed094f2
1 /* This file is part of GCC.
3 GCC is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 3, or (at your option)
6 any later version.
8 GCC is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
13 You should have received a copy of the GNU General Public License
14 along with GCC; see the file COPYING3. If not see
15 <http://www.gnu.org/licenses/>. */
17 #ifndef __PYVEC_H__
18 #define __PYVEC_H__
20 typedef struct gpy_vector_t {
21 void ** vector;
22 signed long size, length;
23 } gpy_ident_vector_t;
25 enum OPERATOR_T {
26 LESS_OP, GREATER_OP, EQ_EQ_OP,
27 GREATER_EQ_OP, LESS_EQ_OP
30 typedef unsigned long gpy_hashval_t;
31 typedef struct gpy_hash_entry {
32 gpy_hashval_t hash;
33 void * data;
34 } gpy_hash_entry_t ;
36 typedef struct gpy_hash_table_t {
37 unsigned int size, length;
38 gpy_hash_entry_t * array;
39 } gpy_hash_tab_t ;
41 typedef struct gpy_id_t {
42 char * ident;
43 } gpy_ident_t;
44 typedef gpy_ident_t * gpy_ident;
46 typedef int gpy_int;
47 DEF_VEC_I( gpy_int );
48 DEF_VEC_ALLOC_I( gpy_int,gc );
50 DEF_VEC_P( gpy_ident );
51 DEF_VEC_ALLOC_P( gpy_ident,gc );
53 typedef struct GTY(()) gpy_context_branch_t {
54 gpy_hash_tab_t * decls;
55 VEC(gpy_ident,gc) *decl_t;
56 } gpy_context_branch ;
58 typedef gpy_symbol_obj *gpy_sym;
59 typedef gpy_context_branch *gpy_ctx_t;
61 DEF_VEC_P( gpy_sym );
62 DEF_VEC_ALLOC_P( gpy_sym,gc );
64 DEF_VEC_P( gpy_ctx_t );
65 DEF_VEC_ALLOC_P( gpy_ctx_t,gc );
67 extern VEC(gpy_ctx_t,gc) * gpy_ctx_table;
68 extern VEC(gpy_sym,gc) * gpy_garbage_decls;
69 extern VEC(tree,gc) * global_decls;
70 extern VEC(tree,gc) * gpy_function_decls;
72 extern void gpy_init_context_tables ( void );
74 #endif /*__PY_VEC_H__*/