diff options
| author | redbrain <redbrain@crules.org> | 2010-07-11 02:52:16 +0100 |
|---|---|---|
| committer | redbrain <redbrain@crules.org> | 2010-07-11 02:52:16 +0100 |
| commit | 7612bd9ec1875a0baae2ca707db055e5c09de808 (patch) | |
| tree | bf2647e6c1ede85eb9fe0e0bf9b4f3810cd5ff89 /libgpython/include/gpython | |
| parent | ef7dc4b9112eddf5233a5f54aa21c68392c3dc93 (diff) | |
| download | gcc-7612bd9ec1875a0baae2ca707db055e5c09de808.tar.gz | |
print out the operation
Diffstat (limited to 'libgpython/include/gpython')
| -rw-r--r-- | libgpython/include/gpython/objects.h | 44 |
1 files changed, 23 insertions, 21 deletions
diff --git a/libgpython/include/gpython/objects.h b/libgpython/include/gpython/objects.h index 1ad034b5ee0..f5100a9aeec 100644 --- a/libgpython/include/gpython/objects.h +++ b/libgpython/include/gpython/objects.h @@ -17,27 +17,6 @@ along with GCC; see the file COPYING3. If not see #ifndef __GCC_OBJECTS_H__ #define __GCC_OBJECTS_H__ -typedef struct gpy_rr_object_state_t { - char * obj_t_ident; - signed long ref_count; - void * self; -} gpy_object_state_t ; - -#define Gpy_Object_State_Init( x ) \ - x = gpy_malloc( sizeof(struct gpy_rr_object_state_t) ); \ - debug("object created at <%p>!\n", (void*)x ); \ - x->obj_t_ident = NULL; x->ref_count = 0; \ - x->self = NULL; - -#define Gpy_Object_State_Init_Ctx( x,y ) \ - Gpy_Object_State_Init( x ); \ - gpy_vec_push( ((gpy_context_t*)(y->vector[y->length-1]))->symbols, x ); - -#define NULL_OBJ_STATE NULL - -typedef gpy_object_state_t * (*binary_op)( gpy_object_state_t *, - gpy_object_state_t * ); - enum GPY_LIT_T { TYPE_INTEGER, TYPE_STRING, TYPE_NONE }; typedef struct gpy_rr_literal_t { @@ -54,6 +33,16 @@ typedef struct gpy_rr_literal_t { x->type = TYPE_NONE; \ x->literal.integer = 0; +typedef struct gpy_rr_object_state_t { + char * obj_t_ident; + signed long ref_count; + void * self; + struct gpy_type_obj_def_t * definition; +} gpy_object_state_t ; + +typedef gpy_object_state_t * (*binary_op)( gpy_object_state_t *, + gpy_object_state_t * ); + typedef struct gpy_number_prot_t { bool init; @@ -84,6 +73,19 @@ typedef struct gpy_type_obj_def_t { const struct gpy_number_prot_t * binary_protocol; } gpy_type_obj_def_t ; + +#define Gpy_Object_State_Init( x ) \ + x = gpy_malloc( sizeof(struct gpy_rr_object_state_t) ); \ + debug("object created at <%p>!\n", (void*)x ); \ + x->obj_t_ident = NULL; x->ref_count = 0; \ + x->self = NULL; x->definition = NULL; + +#define Gpy_Object_State_Init_Ctx( x,y ) \ + Gpy_Object_State_Init( x ); \ + gpy_vec_push( ((gpy_context_t*)(y->vector[y->length-1]))->symbols, x ); + +#define NULL_OBJ_STATE NULL + extern void gpy_rr_init_runtime( void ); extern gpy_object_state_t * gpy_rr_fold_integer( int ); |
