Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add missing initialization logic. Thanks to kboga++ for the hint that…
… led me to this issue.
  • Loading branch information
jnthn committed Nov 1, 2011
1 parent fd65ca0 commit 42c18a2
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/6model/reprs/P6opaque.c
Expand Up @@ -417,7 +417,14 @@ static PMC * allocate(PARROT_INTERP, STable *st) {
/* Initialize a new instance. */
static void initialize(PARROT_INTERP, STable *st, void *data) {
P6opaqueREPRData * repr_data = (P6opaqueREPRData *) st->REPR_data;
/* XXX Fill this out when we may have nested things to initialize. */
if (repr_data->initialize_slots) {
INTVAL i;
for (i = 0; repr_data->initialize_slots[i] >= 0; i++) {
INTVAL offset = repr_data->attribute_offsets[repr_data->initialize_slots[i]];
STable *st = repr_data->flattened_stables[repr_data->initialize_slots[i]];
st->REPR->initialize(interp, st, (char *)data + offset);
}
}
}

/* Copies to the body of one object to another. */
Expand Down

0 comments on commit 42c18a2

Please sign in to comment.