diff options
author | redbrain <redbrain@gcc.gnu.org> | 2012-04-21 19:12:19 +0100 |
---|---|---|
committer | redbrain <redbrain@gcc.gnu.org> | 2012-04-21 19:12:19 +0100 |
commit | 6bb2994a691ee688ac538c2ac9d382804aad5abe (patch) | |
tree | 9bf8e9a3e0886c75383b07c144be6a157b285c11 /libgpython/include/gpython | |
parent | 30903ba9eb9e6b3f3d926041cfc438c71377d6f6 (diff) | |
download | gcc-alpha-v0.1.tar.gz |
lots of argument passing work finished and we can compile python nowalpha-v0.1
Diffstat (limited to 'libgpython/include/gpython')
-rw-r--r-- | libgpython/include/gpython/objects.h | 5 | ||||
-rw-r--r-- | libgpython/include/gpython/runtime.h | 17 |
2 files changed, 20 insertions, 2 deletions
diff --git a/libgpython/include/gpython/objects.h b/libgpython/include/gpython/objects.h index 114a551c676..ecc8d72d8a8 100644 --- a/libgpython/include/gpython/objects.h +++ b/libgpython/include/gpython/objects.h @@ -67,7 +67,8 @@ typedef struct gpy_object_t { } o ; } gpy_object_t ; -typedef void (*fndecl)(gpy_object_t **); +typedef void (*staticmethod_fndecl)(gpy_object_t **); +typedef void (*classmethod_fndecl) (gpy_object_t *, gpy_object_t **); typedef gpy_object_t * (*binary_op)(gpy_object_t *, gpy_object_t *); typedef struct gpy_number_prot_t { @@ -119,8 +120,10 @@ extern gpy_object_attrib_t ** gpy_args_lit_parse_attrib_table (gpy_object_t *); extern gpy_object_t * gpy_create_object_state (gpy_typedef_t *, void *); extern gpy_object_t * gpy_create_object_decl (gpy_typedef_t *, void *); extern unsigned char * gpy_object_staticmethod_getaddr (gpy_object_t *); +extern unsigned char * gpy_object_classmethod_getaddr (gpy_object_t *); extern void gpy_obj_integer_mod_init (gpy_vector_t * const); extern void gpy_obj_staticmethod_mod_init (gpy_vector_t * const); +extern void gpy_object_classmethod_inherit_self (gpy_object_t *, gpy_object_t *); #endif //__GCC_OBJECTS_H__ diff --git a/libgpython/include/gpython/runtime.h b/libgpython/include/gpython/runtime.h index cf049237667..11ecfd3597e 100644 --- a/libgpython/include/gpython/runtime.h +++ b/libgpython/include/gpython/runtime.h @@ -17,7 +17,22 @@ along with GCC; see the file COPYING3. If not see #ifndef __GCC_RUNTIME_H__ #define __GCC_RUNTIME_H__ -extern gpy_object_t * gpy_rr_fold_functor_decl (const char *, unsigned char *); +/* + accesors to the internal types... + */ +#define __gpy_integer_type_node \ + (gpy_typedef_t *) __GPY_GLOBL_PRIMITIVES->vector[0] +#define __gpy_staticmethod_type_node \ + (gpy_typedef_t *) __GPY_GLOBL_PRIMITIVES->vector[1] +#define __gpy_class_type_node \ + (gpy_typedef_t *) __GPY_GLOBL_PRIMITIVES->vector[2] +#define __gpy_classmethod_type_node \ + (gpy_typedef_t *) __GPY_GLOBL_PRIMITIVES->vector[3] + +extern gpy_object_t * gpy_rr_fold_staticmethod_decl (const char *, unsigned char *); +extern gpy_object_t * gpy_rr_fold_classmethod_decl (const char *, unsigned char *); extern unsigned char * gpy_rr_eval_attrib_reference (gpy_object_t *, const char *); +extern void gpy_rr_eval_print (int, int, ...); + #endif //__GCC_RUNTIME_H__ |