diff --git a/mjit.c b/mjit.c index 3eb2ee8a50..be4bd9681e 100644 --- a/mjit.c +++ b/mjit.c @@ -118,7 +118,7 @@ mjit_update_references(const rb_iseq_t *iseq) return; CRITICAL_SECTION_START(4, "mjit_free_iseq"); if (iseq->body->jit_unit) { - iseq->body->jit_unit->iseq = (rb_iseq_t *)rb_gc_new_location(iseq->body->jit_unit->iseq); + iseq->body->jit_unit->iseq = (rb_iseq_t *)rb_gc_new_location((VALUE)iseq->body->jit_unit->iseq); } CRITICAL_SECTION_FINISH(4, "mjit_free_iseq"); } @@ -236,7 +236,7 @@ create_unit(const rb_iseq_t *iseq) return; unit->id = current_unit_num++; - unit->iseq = iseq; + unit->iseq = (rb_iseq_t *)iseq; iseq->body->jit_unit = unit; } diff --git a/mjit_worker.c b/mjit_worker.c index 819a4a06ca..8b68cf01a0 100644 --- a/mjit_worker.c +++ b/mjit_worker.c @@ -128,7 +128,7 @@ struct rb_mjit_unit { int id; // Dlopen handle of the loaded object file. void *handle; - const rb_iseq_t *iseq; + rb_iseq_t *iseq; #ifndef _MSC_VER // This value is always set for `compact_all_jit_code`. Also used for lazy deletion. char *o_file;