-
-
Save FROGGS/5221e53f8f53d60603e0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/6model/serialization.c b/src/6model/serialization.c | |
index 1b3be79..c35844c 100644 | |
--- a/src/6model/serialization.c | |
+++ b/src/6model/serialization.c | |
@@ -255,7 +255,7 @@ static void get_stable_ref_info(MVMThreadContext *tc, MVMSerializationWriter *wr | |
/* Add to this SC if needed. */ | |
if (OBJ_IS_NULL(STABLE_STRUCT(st)->sc)) { | |
STABLE_STRUCT(st)->sc = writer->root.sc; | |
- MVM_repr_push_o(tc, writer->stables_list, st); | |
+ MVM_repr_push_o(tc, writer->stables_list, (MVMObject *)st); | |
} | |
/* Work out SC reference. */ | |
@@ -280,7 +280,7 @@ static void write_int_func(MVMThreadContext *tc, MVMSerializationWriter *writer, | |
} | |
/* Writing function for native numbers. */ | |
-static void write_num_func(MVMThreadContext *tc, MVMSerializationWriter *writer, FLOATVAL value) { | |
+static void write_num_func(MVMThreadContext *tc, MVMSerializationWriter *writer, MVMnum64 value) { | |
expand_storage_if_needed(tc, writer, 8); | |
write_double(*(writer->cur_write_buffer), *(writer->cur_write_offset), value); | |
*(writer->cur_write_offset) += 8; | |
@@ -1040,7 +1040,7 @@ MVMString * MVM_serialization_serialize(MVMThreadContext *tc, MVMSerializationCo | |
MVMint32 version = CURRENT_VERSION; | |
/* Set up writer with some initial settings. */ | |
- MVMSerializationWriter *writer = mem_allocate_zeroed_typed(MVMSerializationWriter); | |
+ MVMSerializationWriter *writer = malloc(sizeof(MVMSerializationWriter)); | |
GETATTR_SerializationContext_root_stables(tc, sc, stables); | |
GETATTR_SerializationContext_root_objects(tc, sc, objects); | |
GETATTR_SerializationContext_root_codes(tc, sc, codes); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment