Skip to content

Commit

Permalink
MSVC and strange errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
bakpakin committed Sep 29, 2024
1 parent e96dd51 commit f36d544
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core/sysir.c
Original file line number Diff line number Diff line change
Expand Up @@ -1220,7 +1220,7 @@ static void janet_sys_ir_init(JanetSysIR *out, JanetView instructions, JanetSysI

/* Patch up name mapping arrays */
/* TODO - make more efficient, don't rebuild from scratch every time */
if (linkage->type_names) janet_free(linkage->type_names);
if (linkage->type_names) janet_free((void *) linkage->type_names);
linkage->type_names = table_to_string_array(linkage->type_name_lookup, linkage->type_def_count);
ir.register_names = table_to_string_array(ir.register_name_lookup, ir.register_count);

Expand Down Expand Up @@ -1774,7 +1774,7 @@ static int sysir_gc(void *p, size_t s) {
janet_free(ir->constants);
janet_free(ir->types);
janet_free(ir->instructions);
janet_free(ir->register_names);
janet_free((void *) ir->register_names);
return 0;
}

Expand Down Expand Up @@ -1804,7 +1804,7 @@ static int sysir_context_gc(void *p, size_t s) {
(void) s;
janet_free(linkage->field_defs);
janet_free(linkage->type_defs);
janet_free(linkage->type_names);
janet_free((void *) linkage->type_names);
return 0;
}

Expand Down

0 comments on commit f36d544

Please sign in to comment.