Skip to content

Commit c098088

Browse files
committed
Couple of fixes to things that weren't quite right in the REPR updates.
1 parent b93593f commit c098088

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

src/6model/reprs/CStruct.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ REPROps * CStruct_initialize(PARROT_INTERP,
491491
this_repr->allocate = allocate;
492492
this_repr->initialize = initialize;
493493
this_repr->copy_to = copy_to;
494-
this_repr->attr_funcs = mem_allocate_typed(REPROps_Attributes);
494+
this_repr->attr_funcs = mem_allocate_typed(REPROps_Attribute);
495495
this_repr->attr_funcs->get_attribute_boxed = get_attribute_boxed;
496496
this_repr->attr_funcs->get_attribute_ref = get_attribute_ref;
497497
this_repr->attr_funcs->bind_attribute_boxed = bind_attribute_boxed;

src/6model/reprs/HashAttrStore.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ REPROps * HashAttrStore_initialize(PARROT_INTERP) {
114114
this_repr->allocate = allocate;
115115
this_repr->initialize = initialize;
116116
this_repr->copy_to = copy_to;
117-
this_repr->attr_funcs = mem_allocate_typed(REPROps_Attributes);
117+
this_repr->attr_funcs = mem_allocate_typed(REPROps_Attribute);
118118
this_repr->attr_funcs->get_attribute_boxed = get_attribute_boxed;
119119
this_repr->attr_funcs->get_attribute_ref = get_attribute_ref;
120120
this_repr->attr_funcs->bind_attribute_boxed = bind_attribute_boxed;

src/6model/reprs/P6opaque.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@ static void set_int(PARROT_INTERP, STable *st, void *data, INTVAL value) {
594594
P6opaqueREPRData *repr_data = (P6opaqueREPRData *)st->REPR_data;
595595
if (repr_data->unbox_int_slot >= 0) {
596596
STable *st = repr_data->flattened_stables[repr_data->unbox_int_slot];
597-
st->REPR->set_int(interp, st, (char *)data + repr_data->attribute_offsets[repr_data->unbox_int_slot], value);
597+
st->REPR->box_funcs->set_int(interp, st, (char *)data + repr_data->attribute_offsets[repr_data->unbox_int_slot], value);
598598
}
599599
else {
600600
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION,
@@ -608,7 +608,7 @@ static INTVAL get_int(PARROT_INTERP, STable *st, void *data) {
608608
P6opaqueREPRData *repr_data = (P6opaqueREPRData *)st->REPR_data;
609609
if (repr_data->unbox_int_slot >= 0) {
610610
STable *st = repr_data->flattened_stables[repr_data->unbox_int_slot];
611-
return st->REPR->get_int(interp, st, (char *)data + repr_data->attribute_offsets[repr_data->unbox_int_slot]);
611+
return st->REPR->box_funcs->get_int(interp, st, (char *)data + repr_data->attribute_offsets[repr_data->unbox_int_slot]);
612612
}
613613
else {
614614
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION,
@@ -622,7 +622,7 @@ static void set_num(PARROT_INTERP, STable *st, void *data, FLOATVAL value) {
622622
P6opaqueREPRData *repr_data = (P6opaqueREPRData *)st->REPR_data;
623623
if (repr_data->unbox_num_slot >= 0) {
624624
STable *st = repr_data->flattened_stables[repr_data->unbox_num_slot];
625-
st->REPR->set_num(interp, st, (char *)data + repr_data->attribute_offsets[repr_data->unbox_num_slot], value);
625+
st->REPR->box_funcs->set_num(interp, st, (char *)data + repr_data->attribute_offsets[repr_data->unbox_num_slot], value);
626626
}
627627
else {
628628
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION,
@@ -636,7 +636,7 @@ static FLOATVAL get_num(PARROT_INTERP, STable *st, void *data) {
636636
P6opaqueREPRData *repr_data = (P6opaqueREPRData *)st->REPR_data;
637637
if (repr_data->unbox_num_slot >= 0) {
638638
STable *st = repr_data->flattened_stables[repr_data->unbox_num_slot];
639-
return st->REPR->get_num(interp, st, (char *)data + repr_data->attribute_offsets[repr_data->unbox_num_slot]);
639+
return st->REPR->box_funcs->get_num(interp, st, (char *)data + repr_data->attribute_offsets[repr_data->unbox_num_slot]);
640640
}
641641
else {
642642
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION,
@@ -650,7 +650,7 @@ static void set_str(PARROT_INTERP, STable *st, void *data, STRING *value) {
650650
P6opaqueREPRData *repr_data = (P6opaqueREPRData *)st->REPR_data;
651651
if (repr_data->unbox_str_slot >= 0) {
652652
STable *st = repr_data->flattened_stables[repr_data->unbox_str_slot];
653-
st->REPR->set_str(interp, st, (char *)data + repr_data->attribute_offsets[repr_data->unbox_str_slot], value);
653+
st->REPR->box_funcs->set_str(interp, st, (char *)data + repr_data->attribute_offsets[repr_data->unbox_str_slot], value);
654654
}
655655
else {
656656
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION,
@@ -664,7 +664,7 @@ static STRING * get_str(PARROT_INTERP, STable *st, void *data) {
664664
P6opaqueREPRData *repr_data = (P6opaqueREPRData *)st->REPR_data;
665665
if (repr_data->unbox_str_slot >= 0) {
666666
STable *st = repr_data->flattened_stables[repr_data->unbox_str_slot];
667-
return st->REPR->get_str(interp, st, (char *)data + repr_data->attribute_offsets[repr_data->unbox_str_slot]);
667+
return st->REPR->box_funcs->get_str(interp, st, (char *)data + repr_data->attribute_offsets[repr_data->unbox_str_slot]);
668668
}
669669
else {
670670
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION,
@@ -857,7 +857,7 @@ REPROps * P6opaque_initialize(PARROT_INTERP) {
857857
this_repr->allocate = allocate;
858858
this_repr->initialize = initialize;
859859
this_repr->copy_to = copy_to;
860-
this_repr->attr_funcs = mem_allocate_typed(REPROps_Attributes);
860+
this_repr->attr_funcs = mem_allocate_typed(REPROps_Attribute);
861861
this_repr->attr_funcs->get_attribute_boxed = get_attribute_boxed;
862862
this_repr->attr_funcs->get_attribute_ref = get_attribute_ref;
863863
this_repr->attr_funcs->bind_attribute_boxed = bind_attribute_boxed;

0 commit comments

Comments
 (0)