diff --git a/src/6model/repr_registry.c b/src/6model/repr_registry.c index b980733a7e..512622f64d 100644 --- a/src/6model/repr_registry.c +++ b/src/6model/repr_registry.c @@ -43,9 +43,9 @@ register_repr(PARROT_INTERP, STRING *name, REPROps *repr) INTVAL ID = num_reprs; num_reprs++; if (repr_registry) - repr_registry = mem_sys_realloc(repr_registry, num_reprs * sizeof(REPROps *)); + repr_registry = mem_sys_realloc(repr_registry, num_reprs * sizeof (REPROps *)); else - repr_registry = mem_sys_allocate(num_reprs * sizeof(REPROps *)); + repr_registry = mem_sys_allocate(num_reprs * sizeof (REPROps *)); repr_registry[ID] = repr; VTABLE_set_integer_keyed_str(interp, repr_name_to_id_map, name, ID); } @@ -97,3 +97,10 @@ REPR_get_by_name(PARROT_INTERP, STRING *name) { return repr_registry[VTABLE_get_integer_keyed_str(interp, repr_name_to_id_map, name)]; } + +/* + * Local variables: + * c-file-style: "parrot" + * End: + * vim: expandtab shiftwidth=4 cinoptions='\:2=2' : + */ diff --git a/src/6model/reprs/HashAttrStore.c b/src/6model/reprs/HashAttrStore.c index 4568b1565c..bbb1e8cd77 100644 --- a/src/6model/reprs/HashAttrStore.c +++ b/src/6model/reprs/HashAttrStore.c @@ -197,8 +197,7 @@ instance_of(PARROT_INTERP, PMC *WHAT) /* Allocate and set up object instance. */ obj = (HashAttrStoreInstance *) Parrot_gc_allocate_fixed_size_storage( interp, - sizeof(HashAttrStoreInstance) - ); + sizeof (HashAttrStoreInstance)); obj->common.stable = STABLE_PMC(WHAT); obj->store = pmc_new(interp, enum_class_Hash); @@ -290,7 +289,7 @@ repr_clone(PARROT_INTERP, PMC *to_clone) HashAttrStoreInstance *obj; /* Allocate and set up object instance. */ - obj = (HashAttrStoreInstance *) Parrot_gc_allocate_fixed_size_storage(interp, sizeof(HashAttrStoreInstance)); + obj = (HashAttrStoreInstance *) Parrot_gc_allocate_fixed_size_storage(interp, sizeof (HashAttrStoreInstance)); obj->common.stable = STABLE_PMC(to_clone); obj->store = VTABLE_clone(interp, ((HashAttrStoreInstance *)PMC_data(to_clone))->store); @@ -370,7 +369,7 @@ gc_mark(PARROT_INTERP, PMC *obj) static void gc_free(PARROT_INTERP, PMC *obj) { - Parrot_gc_free_fixed_size_storage(interp, sizeof(HashAttrStoreInstance), PMC_data(obj)); + Parrot_gc_free_fixed_size_storage(interp, sizeof (HashAttrStoreInstance), PMC_data(obj)); PMC_data(obj) = NULL; } @@ -426,3 +425,10 @@ HashAttrStore_initialize(PARROT_INTERP) this_repr->is_attribute_initialized = is_attribute_initialized; return this_repr; } + +/* + * Local variables: + * c-file-style: "parrot" + * End: + * vim: expandtab shiftwidth=4 cinoptions='\:2=2' : + */ diff --git a/src/6model/reprs/P6int.c b/src/6model/reprs/P6int.c index 4f25a68340..641b5c456d 100644 --- a/src/6model/reprs/P6int.c +++ b/src/6model/reprs/P6int.c @@ -358,7 +358,7 @@ get_storage_spec(PARROT_INTERP, STable *st) { storage_spec spec; spec.inlineable = STORAGE_SPEC_INLINED; - spec.bits = sizeof(INTVAL) * 8; + spec.bits = sizeof (INTVAL) * 8; spec.boxed_primitive = STORAGE_SPEC_BP_INT; return spec; } @@ -403,3 +403,10 @@ P6int_initialize(PARROT_INTERP) this_repr->is_attribute_initialized = is_attribute_initialized; return this_repr; } + +/* + * Local variables: + * c-file-style: "parrot" + * End: + * vim: expandtab shiftwidth=4 cinoptions='\:2=2' : + */ diff --git a/src/6model/reprs/P6num.c b/src/6model/reprs/P6num.c index ab30719eaf..732bc358aa 100644 --- a/src/6model/reprs/P6num.c +++ b/src/6model/reprs/P6num.c @@ -358,7 +358,7 @@ get_storage_spec(PARROT_INTERP, STable *st) { storage_spec spec; spec.inlineable = STORAGE_SPEC_INLINED; - spec.bits = sizeof(FLOATVAL) * 8; + spec.bits = sizeof (FLOATVAL) * 8; spec.boxed_primitive = STORAGE_SPEC_BP_NUM; return spec; } diff --git a/src/6model/reprs/P6opaque.c b/src/6model/reprs/P6opaque.c index b67ac70ac0..5afc594a0c 100644 --- a/src/6model/reprs/P6opaque.c +++ b/src/6model/reprs/P6opaque.c @@ -371,7 +371,7 @@ index_mapping_and_flat_list(PARROT_INTERP, PMC *WHAT, P6opaqueREPRData *repr_dat /* We can now form the name map. */ num_classes = VTABLE_elements(interp, class_list); - result = (P6opaqueNameMap *) mem_sys_allocate_zeroed(sizeof(P6opaqueNameMap) * (1 + num_classes)); + result = (P6opaqueNameMap *) mem_sys_allocate_zeroed(sizeof (P6opaqueNameMap) * (1 + num_classes)); for (i = 0; i < num_classes; i++) { result[i].class_key = VTABLE_get_pmc_keyed_int(interp, class_list, i); result[i].name_map = VTABLE_get_pmc_keyed_int(interp, attr_map_list, i); @@ -408,14 +408,14 @@ compute_allocation_strategy(PARROT_INTERP, PMC *WHAT, P6opaqueREPRData *repr_dat /* If we have no attributes in the index mapping, then just the header. */ if (repr_data->name_to_index_mapping[0].class_key == NULL) { - repr_data->allocation_size = sizeof(SixModelObjectCommonalities) + sizeof(PMC *); + repr_data->allocation_size = sizeof (SixModelObjectCommonalities) + sizeof (PMC *); } /* Otherwise, we need to compute the allocation strategy. */ else { /* Initial size is for commonalities (e.g. shared table pointer) and * spill hash space. */ - INTVAL cur_size = sizeof(SixModelObjectCommonalities) + sizeof(PMC *); + INTVAL cur_size = sizeof (SixModelObjectCommonalities) + sizeof (PMC *); /* Get number of attributes and set up various counters. */ INTVAL num_attrs = VTABLE_elements(interp, flat_list); @@ -426,7 +426,7 @@ compute_allocation_strategy(PARROT_INTERP, PMC *WHAT, P6opaqueREPRData *repr_dat /* Allocate offset array and GC mark info arrays. */ repr_data->num_attributes = num_attrs; - repr_data->attribute_offsets = (INTVAL *) mem_sys_allocate(info_alloc * sizeof(INTVAL)); + repr_data->attribute_offsets = (INTVAL *) mem_sys_allocate(info_alloc * sizeof (INTVAL)); /* Go over the attributes and arrange their allocation. */ for (i = 0; i < num_attrs; i++) { @@ -439,7 +439,7 @@ compute_allocation_strategy(PARROT_INTERP, PMC *WHAT, P6opaqueREPRData *repr_dat /* Work out what unboxed type it is, if any. Default to a boxed. */ INTVAL unboxed_type = STORAGE_SPEC_BP_NONE; - INTVAL bits = sizeof(PMC *) * 8; + INTVAL bits = sizeof (PMC *) * 8; if (!PMC_IS_NULL(type)) { /* Get the storage spec of the type and see what it wants. */ storage_spec spec = REPR(type)->get_storage_spec(interp, STABLE(type)); @@ -481,19 +481,19 @@ compute_allocation_strategy(PARROT_INTERP, PMC *WHAT, P6opaqueREPRData *repr_dat repr_data->attribute_offsets[i] = cur_size; if (unboxed_type == STORAGE_SPEC_BP_NONE) { if (!repr_data->gc_pmc_mark_offsets) - repr_data->gc_pmc_mark_offsets = (INTVAL *) mem_sys_allocate_zeroed(info_alloc * sizeof(INTVAL)); + repr_data->gc_pmc_mark_offsets = (INTVAL *) mem_sys_allocate_zeroed(info_alloc * sizeof (INTVAL)); repr_data->gc_pmc_mark_offsets[cur_pmc_attr] = cur_size; cur_pmc_attr++; if (!PMC_IS_NULL(av_cont)) { /* Stash away auto-viv container info. */ if (!repr_data->auto_viv_values) - repr_data->auto_viv_values = (PMC **) mem_sys_allocate_zeroed(info_alloc * sizeof(PMC *)); + repr_data->auto_viv_values = (PMC **) mem_sys_allocate_zeroed(info_alloc * sizeof (PMC *)); repr_data->auto_viv_values[i] = av_cont; } } if (unboxed_type == STORAGE_SPEC_BP_STR) { if (!repr_data->gc_str_mark_offsets) - repr_data->gc_str_mark_offsets = (INTVAL *) mem_sys_allocate_zeroed(info_alloc * sizeof(INTVAL)); + repr_data->gc_str_mark_offsets = (INTVAL *) mem_sys_allocate_zeroed(info_alloc * sizeof (INTVAL)); repr_data->gc_str_mark_offsets[cur_str_attr] = cur_size; cur_str_attr++; } @@ -875,7 +875,7 @@ repr_clone(PARROT_INTERP, PMC *to_clone) } else { obj = mem_allocate_zeroed_typed(P6opaqueInstance); - memcpy(obj, PMC_data(to_clone), sizeof(P6opaqueInstance)); + memcpy(obj, PMC_data(to_clone), sizeof (P6opaqueInstance)); } return wrap_object(interp, obj); @@ -1223,3 +1223,10 @@ P6opaque_initialize(PARROT_INTERP) this_repr->change_type = change_type; return this_repr; } + +/* + * Local variables: + * c-file-style: "parrot" + * End: + * vim: expandtab shiftwidth=4 cinoptions='\:2=2' : + */ diff --git a/src/6model/reprs/P6str.c b/src/6model/reprs/P6str.c index f0b5379ee9..2b624d89b3 100644 --- a/src/6model/reprs/P6str.c +++ b/src/6model/reprs/P6str.c @@ -367,7 +367,7 @@ get_storage_spec(PARROT_INTERP, STable *st) { storage_spec spec; spec.inlineable = STORAGE_SPEC_INLINED; - spec.bits = sizeof(STRING *) * 8; + spec.bits = sizeof (STRING *) * 8; spec.boxed_primitive = STORAGE_SPEC_BP_STR; return spec; } @@ -412,3 +412,10 @@ P6str_initialize(PARROT_INTERP) this_repr->is_attribute_initialized = is_attribute_initialized; return this_repr; } + +/* + * Local variables: + * c-file-style: "parrot" + * End: + * vim: expandtab shiftwidth=4 cinoptions='\:2=2' : + */ diff --git a/src/6model/sixmodelobject.c b/src/6model/sixmodelobject.c index 894307cf68..bfb5969bc3 100644 --- a/src/6model/sixmodelobject.c +++ b/src/6model/sixmodelobject.c @@ -16,12 +16,12 @@ static PMC * default_find_method(PARROT_INTERP, INTVAL hint) __attribute__nonnull__(1); -static INTVAL default_type_check (PARROT_INTERP, PMC *to_check, PMC *wanted) +static INTVAL default_type_check(PARROT_INTERP, PMC *to_check, PMC *wanted) __attribute__nonnull__(1); #define ASSERT_ARGS_default_find_method __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ PARROT_ASSERT_ARG(interp)) -#define ASSERT_ARGS_default_type_check __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ +#define ASSERT_ARGS_default_type_check __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ PARROT_ASSERT_ARG(interp)) /* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */ /* HEADERIZER END: static */ @@ -110,7 +110,7 @@ default_find_method(PARROT_INTERP, PMC *obj, STRING *name, INTVAL hint) * be the only one we end up with since the HOW is the authority here. * So we may end up not calling this through the S-Table in the end. */ static INTVAL -default_type_check (PARROT_INTERP, PMC *to_check, PMC *wanted) +default_type_check(PARROT_INTERP, PMC *to_check, PMC *wanted) { PMC *HOW, *meth, *result; diff --git a/src/ops/6model.ops b/src/ops/6model.ops index 0c2f872618..8107a19b2a 100644 --- a/src/ops/6model.ops +++ b/src/ops/6model.ops @@ -405,7 +405,7 @@ inline op publish_type_check_cache(in PMC, in PMC) :base_core { STable *target_st = STABLE(target); INTVAL items = VTABLE_elements(interp, $2); if (items > 0) { - PMC ** cache = (PMC **) mem_sys_allocate(sizeof(PMC *) * items); + PMC ** cache = (PMC **) mem_sys_allocate(sizeof (PMC *) * items); INTVAL i; for (i = 0; i < items; i++) cache[i] = decontainerize(interp, VTABLE_get_pmc_keyed_int(interp, $2, i)); @@ -979,3 +979,10 @@ inline op set_container_spec(in PMC, in PMC, in STR, in PMC) :base_core { =back */ + +/* + * Local variables: + * c-file-style: "parrot" + * End: + * vim: expandtab shiftwidth=4 cinoptions='\:2=2' : + */ diff --git a/src/pmc/serializationcontext.pmc b/src/pmc/serializationcontext.pmc index 909d6c29b9..f071e5305d 100644 --- a/src/pmc/serializationcontext.pmc +++ b/src/pmc/serializationcontext.pmc @@ -66,24 +66,24 @@ pmclass SerializationContext auto_attrs { INTVAL elems; GETATTR_SerializationContext_root_objects(interp, SELF, root_objects); elems = VTABLE_elements(interp, root_objects); - RETURN (INTVAL elems); + RETURN(INTVAL elems); } METHOD STRING* handle() { STRING *handle; GETATTR_SerializationContext_handle(interp, SELF, handle); - RETURN (STRING* handle); + RETURN(STRING* handle); } METHOD set_description(STRING *description) { SETATTR_SerializationContext_description(interp, SELF, description); - RETURN (STRING* description); + RETURN(STRING* description); } METHOD STRING* description() { STRING *description; GETATTR_SerializationContext_description(interp, SELF, description); - RETURN (STRING* description); + RETURN(STRING* description); } METHOD INTVAL slot_index_for(PMC *obj) { @@ -94,10 +94,17 @@ pmclass SerializationContext auto_attrs { count = VTABLE_elements(interp, root_objects); for (i = 0; i < count; i++) { if (VTABLE_get_pmc_keyed_int(interp, root_objects, i) == obj) { - RETURN (INTVAL i); + RETURN(INTVAL i); } } Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION, "Object does not exist in serialization context"); } } + +/* + * Local variables: + * c-file-style: "parrot" + * End: + * vim: expandtab shiftwidth=4 cinoptions='\:2=2' : + */