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

Functions with array parameters #39

Open
sponge opened this issue Aug 18, 2020 · 3 comments
Open

Functions with array parameters #39

sponge opened this issue Aug 18, 2020 · 3 comments

Comments

@sponge
Copy link

sponge commented Aug 18, 2020

I've got a native function that passes through int argc, char* argv[]. Is it possible to call this function from within ammer? I didn't see anything that looked immediately relevant on https://aurel300.github.io/ammer/definition-ffi.html but I'm also not super familiar with Haxe to know how this might map over.

@loudoweb
Copy link

I have a similar question: is it possible de return an array to haxe with ammer?

@Aurel300
Copy link
Owner

Whoops, I forgot to respond to this issue. Arrays are my current priority when working on ammer. As discussed in #3, it's important that on targets where arrays can be shared (rather than copied), the user can do so. This makes the API a tiny bit more complex, but there is an early prototype-level attempt at using this in the test suite now (+ the corresponding definitions).

@loudoweb I have not tried this in the test suite, but I think it should work with both ammer.ffi.ArrayFixed and ammer.ffi.ArrayDynamic types.

I am not closing this issue yet because the support is limited to HashLink and C++, and because the API will possibly change still.

@loudoweb
Copy link

Thanks for your quick answer. I'll try that.

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

3 participants