@@ -49,6 +49,13 @@ static void initialize(PARROT_INTERP, STable *st, void *data) {
49
49
mp_zero (& body -> i );
50
50
}
51
51
52
+ /* Copies to the body of one object to another. */
53
+ static void copy_to (PARROT_INTERP , STable * st , void * src , void * dest ) {
54
+ P6bigintBody * src_body = (P6bigintBody * )src ;
55
+ P6bigintBody * dest_body = (P6bigintBody * )dest ;
56
+ mp_init_copy (& src_body -> i , & dest_body -> i );
57
+ }
58
+
52
59
/* Helper to die because this type doesn't support attributes. */
53
60
PARROT_DOES_NOT_RETURN
54
61
static void die_no_attrs (PARROT_INTERP ) {
@@ -77,14 +84,6 @@ static INTVAL hint_for(PARROT_INTERP, STable *st, PMC *class_handle, STRING *nam
77
84
return NO_HINT ;
78
85
}
79
86
80
- /* Clones the current object; simply copies the value. */
81
- static PMC * repr_clone (PARROT_INTERP , PMC * to_clone ) {
82
- P6bigintInstance * obj = mem_allocate_zeroed_typed (P6bigintInstance );
83
- obj -> common .stable = STABLE_PMC (to_clone );
84
- mp_init_copy (& obj -> i , & ((P6bigintInstance * )PMC_data (to_clone ))-> i );
85
- return wrap_object_func (interp , obj );
86
- }
87
-
88
87
/* Used with boxing. Sets an integer value, for representations that can hold
89
88
* one. */
90
89
static void set_int (PARROT_INTERP , PMC * obj , INTVAL value ) {
@@ -184,12 +183,12 @@ REPROps * P6bigint_initialize(PARROT_INTERP,
184
183
this_repr -> type_object_for = type_object_for ;
185
184
this_repr -> allocate = allocate ;
186
185
this_repr -> initialize = initialize ;
186
+ this_repr -> copy_to = copy_to ;
187
187
this_repr -> get_attribute_boxed = get_attribute_boxed ;
188
188
this_repr -> get_attribute_boxed = get_attribute_boxed ;
189
189
this_repr -> bind_attribute_boxed = bind_attribute_boxed ;
190
190
this_repr -> bind_attribute_ref = bind_attribute_ref ;
191
191
this_repr -> hint_for = hint_for ;
192
- this_repr -> clone = repr_clone ;
193
192
this_repr -> set_int = set_int ;
194
193
this_repr -> get_int = get_int ;
195
194
this_repr -> set_num = set_num ;
0 commit comments