Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Ensure that when a type object is cloned, we don't lose the type obje…
…ct flag.
  • Loading branch information
jnthn committed Oct 23, 2011
1 parent d7cec32 commit bbe37f3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/6model/reprs/P6opaque.c
Expand Up @@ -598,13 +598,16 @@ static PMC * repr_clone(PARROT_INTERP, PMC *to_clone) {
if (defined(interp, to_clone)) {
obj = (P6opaqueInstance *)Parrot_gc_allocate_fixed_size_storage(interp, repr_data->allocation_size);
memcpy(obj, PMC_data(to_clone), repr_data->allocation_size);
return wrap_object(interp, obj);
}
else {
PMC *result;
obj = mem_allocate_zeroed_typed(P6opaqueInstance);
memcpy(obj, PMC_data(to_clone), sizeof(P6opaqueInstance));
result = wrap_object(interp, obj);
PObj_flag_SET(private0, result);
return result;
}

return wrap_object(interp, obj);
}

/* Used with boxing. Sets an integer value, for representations that can hold
Expand Down

0 comments on commit bbe37f3

Please sign in to comment.