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

Finish examples and documentation for returning a vector #49

Open
shepmaster opened this issue Jan 7, 2017 · 6 comments
Open

Finish examples and documentation for returning a vector #49

shepmaster opened this issue Jan 7, 2017 · 6 comments

Comments

@shepmaster
Copy link
Owner

No description provided.

@gjtorikian
Copy link

Found myself needing this. 😅

What sort of help are you looking for exactly? Some research, or the entire module written? I'm looking to try this out for my FFI project and curious to know if I can help.

@shepmaster
Copy link
Owner Author

Sorry for the late response, @gjtorikian! You can see the initial work in #48 and #43. The main missing pieces are getting the example to build in the remaining languages and the prose discussion about the nuances needed. I'd be happy to help you with any details!

@gjtorikian
Copy link

Ok, no worries!

I know Ruby, and have built FFI/C bindings for it before, so I'll take a crack at that.

@Stargateur
Copy link
Contributor

Stargateur commented Nov 17, 2018

pub extern fn counter_generate(size: size_t, vec: *mut *mut int16_t) -> size_t

Is quite odd, why return the size giving by the caller, I think it's more logical to do:

pub extern fn counter_generate(size: size_t) -> *mut int16_t

That also allow to return NULL to indicate an error.

@arturtr
Copy link

arturtr commented Jun 13, 2019

It will be good to add an example for ruby

@gjtorikian
Copy link

The bad news is I never got around to adding this content.

The good news is I have an open source library and blog post which passes around vectors; the FFI binding is to Ruby.

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

4 participants