Skip to content

Commit

Permalink
Have nqp::serialize always return the serialized data
Browse files Browse the repository at this point in the history
  • Loading branch information
niner committed Sep 21, 2018
1 parent 2fd9da1 commit 0863fea
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/6model/serialization.c
Expand Up @@ -909,12 +909,13 @@ static MVMString * concatenate_outputs(MVMThreadContext *tc, MVMSerializationWri
tc->serialized = output;
tc->serialized_size = output_size;
tc->serialized_string_heap = writer->root.string_heap;
return NULL;
output_b64 = base64_encode(output, output_size);
}
else {
/* Base 64 encode. */
output_b64 = base64_encode(output, output_size);
MVM_free(output);
}

/* Base 64 encode. */
output_b64 = base64_encode(output, output_size);
MVM_free(output);
if (output_b64 == NULL)
MVM_exception_throw_adhoc(tc,
"Serialization error: failed to convert to base64");
Expand Down

0 comments on commit 0863fea

Please sign in to comment.