diff --git a/src/pmc/cpointer.pmc b/src/pmc/cpointer.pmc index 27c2204..0bee988 100644 --- a/src/pmc/cpointer.pmc +++ b/src/pmc/cpointer.pmc @@ -133,9 +133,11 @@ Creates and returns a clone of the pointer. */ VTABLE PMC *clone() { - PMC * const dest = pmc_new_noinit(INTERP, SELF->vtable->base_type); - PObj_custom_mark_SET(dest); - PMC_data(dest) = PMC_data(SELF); + PMC * const dest = pmc_new(INTERP, SELF->vtable->base_type); + Parrot_CPointer_attributes * const self_attrs = PARROT_CPOINTER(SELF); + Parrot_CPointer_attributes * const dest_attrs = PARROT_CPOINTER(dest); + dest_attrs->sig = self_attrs->sig; + dest_attrs->pointer = self_attrs->pointer; return dest; }