Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Successful build with --enable-runtime5 #2017

Merged
merged 11 commits into from
Nov 14, 2023
Prev Previous commit
Next Next commit
Forward port caml_obj_make_forward
Runtime/ did not include this function, so the implementation is copied from runtime4.
The same code works with the new OCaml 5 lazy implementation.
  • Loading branch information
TheNumbat committed Nov 13, 2023
commit 90dc86d1768c76c7c42718979273c0bbafd6c1c0
7 changes: 7 additions & 0 deletions ocaml/runtime/obj.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,13 @@ CAMLprim value caml_obj_set_raw_field(value arg, value pos, value bits)
return Val_unit;
}

CAMLprim value caml_obj_make_forward(value blk, value fwd)
{
caml_modify(&Field(blk, 0), fwd);
Tag_val (blk) = Forward_tag;
return Val_unit;
}

/* [size] is a value encoding a number of blocks */
CAMLprim value caml_obj_block(value tag, value size)
{
Expand Down