1 /* This file is part of GCC.
3 GCC is free software; you can redistribute it and/or modify it under
4 the terms of the GNU General Public License as published by the Free
5 Software Foundation; either version 3, or (at your option) any later
8 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
9 WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
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 __GCC_RUNTIME_H__
18 #define __GCC_RUNTIME_H__
20 /* Number of items in array. */
21 #define nitems(_a) (sizeof((_a)) / sizeof((_a)[0]))
23 extern gpy_vector_t __GPY_GLOBL_PRIMITIVES
;
24 extern gpy_object_t
** __GPY_RR_STACK_PTR
;
26 typedef struct gpy_module_info
{
33 /* to the internal types... */
34 #define __gpy_func_type_node \
35 (gpy_typedef_t *) __GPY_GLOBL_PRIMITIVES.vector [0]
36 #define __gpy_integer_type_node \
37 (gpy_typedef_t *) __GPY_GLOBL_PRIMITIVES.vector [1]
38 #define __gpy_staticmethod_type_node \
39 (gpy_typedef_t *) __GPY_GLOBL_PRIMITIVES.vector [2]
40 #define __gpy_class_type_node \
41 (gpy_typedef_t *) __GPY_GLOBL_PRIMITIVES.vector [3]
42 #define __gpy_classmethod_type_node \
43 (gpy_typedef_t *) __GPY_GLOBL_PRIMITIVES.vector [4]
44 #define __gpy_list_type_node \
45 (gpy_typedef_t *) __GPY_GLOBL_PRIMITIVES.vector [5]
46 #define __gpy_module_type_node \
47 (gpy_typedef_t *) __GPY_GLOBL_PRIMITIVES.vector [6]
48 #define __gpy_string_type_node \
49 (gpy_typedef_t *) __GPY_GLOBL_PRIMITIVES.vector [7]
50 #define __gpy_dict_type_node \
51 (gpy_typedef_t *) __GPY_GLOBL_PRIMITIVES.vector [8]
53 extern gpy_object_t
* gpy_rr_fold_staticmethod_decl (const char *, unsigned char *, int);
54 extern gpy_object_t
* gpy_rr_fold_classmethod_decl (const char *, unsigned char *, int);
55 extern gpy_object_t
** gpy_rr_eval_attrib_reference (gpy_object_t
*, const char *);
57 extern void gpy_rr_eval_print (int, int, ...);
58 extern void gpy_rr_foldImport (gpy_object_t
**, const char *);
59 extern gpy_object_t
* gpy_rr_fold_string (const char *);
61 #endif //__GCC_RUNTIME_H__