-
Notifications
You must be signed in to change notification settings - Fork 22
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
Bytecode function seems broken #52
Comments
@mt-caret looking into it, but in general, what you say is correct, the generated code should accept a pointer there, then read each value from an offset. Also, |
Aha, interesting, I hadn't considered that aspect. In that case (kind of pedantic, but...), do we want to use this type instead of an |
Just pushed to #53 |
yes! |
@mt-caret just published v0.9.2 with the fix. Thank you for the debugging work and report. |
Thanks for the blazing-fast response!! :) |
Hi,
The following function:
Gets expanded to:
If you were to write this out manually, the Rust compiler gives the following warning:
And in fact, when actually calling this function from bytecode in OCaml I observe panics like
thread '<unnamed>' panicked at 'expected 7 arguments, got 94909550696832'
.I believe we actually want to take a
*const ::ocaml_interop::RawOCaml
and convert it to a slice using::std::slice::from_raw_parts(argv, argn as usize)
.I hit this issue with my own macros which mirror the expansion behavior of
ocaml_export!
in ocaml-interop (but with some additional convenience modifications), and hit this issue which I was able to fix with the above change (commit here: mt-caret/polars-ocaml@337727b).The text was updated successfully, but these errors were encountered: