Skip to content

lev: fix boxed values returned by C stubs#14285

Merged
rgrinberg merged 1 commit intoocaml:mainfrom
rgrinberg:push-kwzkmxplypkz
Apr 21, 2026
Merged

lev: fix boxed values returned by C stubs#14285
rgrinberg merged 1 commit intoocaml:mainfrom
rgrinberg:push-kwzkmxplypkz

Conversation

@rgrinberg
Copy link
Copy Markdown
Member

Backend.supported and related stubs return immediate integers, so those results need Val_int.

Timer.remaining returns Timestamp.t, which is represented as a boxed float, so the stub must use caml_copy_double.

Add expect tests covering both cases.

`Backend.supported` and related stubs return immediate integers, so
those results need `Val_int`.

`Timer.remaining` returns `Timestamp.t`, which is represented as a
boxed float, so the stub must use `caml_copy_double`.

Add expect tests covering both cases.

Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
@rgrinberg rgrinberg merged commit 4367b26 into ocaml:main Apr 21, 2026
29 of 31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant