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

Unboxed float array and records as pointer to double #106

Open
dbuenzli opened this issue Dec 7, 2013 · 3 comments
Open

Unboxed float array and records as pointer to double #106

dbuenzli opened this issue Dec 7, 2013 · 3 comments

Comments

@dbuenzli
Copy link
Contributor

dbuenzli commented Dec 7, 2013

Is there any mechanism to pass arrays and records of OCaml floats only as a C double * value ?

@yallop
Copy link
Owner

yallop commented Dec 7, 2013

This isn't currently supported, because the current approach makes it difficult to ensure that the GC won't move the array at an inconvenient moment. Stub generation (#15) is likely to make it easier to add support.

@dbuenzli
Copy link
Contributor Author

Possible workaround here.

@yallop
Copy link
Owner

yallop commented May 9, 2014

We should be able to support this using @whitequark's approach for strings (#143). There's an additional difficulty regarding alignment, which we can work around by falling back to a copy. @dbuenzli suggests exposing a flag to indicate when the platform relies on copying.

@yallop yallop added this to the ctypes 0.5 milestone Mar 25, 2015
@yallop yallop modified the milestone: ctypes 0.5 Mar 18, 2016
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

No branches or pull requests

2 participants