Skip to content

Commit

Permalink
Merge pull request #1132 from Kaiepi/cstr
Browse files Browse the repository at this point in the history
Fix the CStr REPR's copy_to function
  • Loading branch information
niner committed Sep 19, 2019
2 parents 329f669 + 47cd6c6 commit 270f1b0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/6model/reprs/CStr.c
Expand Up @@ -24,9 +24,10 @@ static void compose(MVMThreadContext *tc, MVMSTable *st, MVMObject *info) {

/* Copies to the body of one object to another. */
static void copy_to(MVMThreadContext *tc, MVMSTable *st, void *src, MVMObject *dest_root, void *dest) {
MVMCPointerBody *src_body = (MVMCPointerBody *)src;
MVMCPointerBody *dest_body = (MVMCPointerBody *)dest;
dest_body->ptr = src_body->ptr;
MVMCStrBody *src_body = (MVMCStrBody *)src;
MVMCStrBody *dest_body = (MVMCStrBody *)dest;
MVM_ASSIGN_REF(tc, &(dest_root->header), dest_body->orig, src_body->orig);
dest_body->cstr = src_body->cstr;
}

static void set_str(MVMThreadContext *tc, MVMSTable *st, MVMObject *root, void *data, MVMString *value) {
Expand Down

0 comments on commit 270f1b0

Please sign in to comment.