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

caml/bigarray.h should export more #4987

Closed
vicuna opened this issue Feb 26, 2010 · 2 comments
Closed

caml/bigarray.h should export more #4987

vicuna opened this issue Feb 26, 2010 · 2 comments

Comments

@vicuna
Copy link

vicuna commented Feb 26, 2010

Original bug ID: 4987
Reporter: goswin
Status: acknowledged (set by @damiendoligez on 2011-06-01T12:32:22Z)
Resolution: open
Priority: normal
Severity: feature
Version: 3.11.2
Category: otherlibs
Monitored by: tgazagna @hcarty @Chris00

Bug description

For libfuse-ocaml bindings I need to pass a buffer to a callback to ocaml. The complication is that, since the buffer is part of a larger request, it is in the middle of an allocated chunk of memory. Luckily ocaml can already handle this case nicely in the form of Bigarrays. In ocaml using "Bigarray.Array1.sub full_request offset length" I can create a subset of the full array without having to copy the data.

But this can not be used in C stubs as caml/bigarray.h does not export the API for proxy objects or the function to create sub arrays. For my use case it would be enough to add

CAMLprim value caml_ba_sub(value vb, value vofs, value vlen);

to caml/bigarray.h. But for completness the proxy struct should probably be exported as well as a helper function to savely free a bigarray (in case of Bigarrays not under GC control).

MfG
Goswin

@github-actions
Copy link

This issue has been open one year with no activity. Consequently, it is being marked with the "stale" label. What this means is that the issue will be automatically closed in 30 days unless more comments are added or the "stale" label is removed. Comments that provide new information on the issue are especially welcome: is it still reproducible? did it appear in other contexts? how critical is it? etc.

@github-actions github-actions bot added the Stale label May 18, 2020
@mshinwell
Copy link
Contributor

I think given that there hasn't been a ping on this issue for a decade, it's reasonable to close this. @mrvn (I assume this was from you) -- please submit a PR if this problem continues to cause trouble. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants