Skip to content

Commit

Permalink
Expose Gc.compact for use in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
g2p committed Feb 17, 2021
1 parent ba1bf04 commit d2c1713
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion testing/rust-caller/ocaml/callable.ml
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,5 @@ let () =
Callback.register "stringify_polymorphic_variant" stringify_polymorphic_variant;
Callback.register "raises_message_exception" raises_message_exception;
Callback.register "raises_nonmessage_exception" raises_nonmessage_exception;
Callback.register "raises_nonblock_exception" raises_nonblock_exception;
Callback.register "raises_nonblock_exception" raises_nonblock_exception;
Callback.register "gc_compact" Gc.compact;
2 changes: 1 addition & 1 deletion testing/rust-caller/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ mod ocaml {
pub fn raises_message_exception(message: String);
pub fn raises_nonmessage_exception(unit: ());
pub fn raises_nonblock_exception(unit: ());
pub fn gc_compact(unit: ());
}
}

Expand Down Expand Up @@ -137,7 +138,6 @@ pub fn allocate_alot(cr: &mut OCamlRuntime) -> bool {
let _x: OCaml<OCamlBytes> = to_ocaml!(cr, vec);
let _y: OCaml<OCamlBytes> = to_ocaml!(cr, vec);
let _z: OCaml<OCamlBytes> = to_ocaml!(cr, vec);
()
}
true
}
Expand Down

0 comments on commit d2c1713

Please sign in to comment.