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
Shared/Unique FFI unwrap #42
Conversation
split FFI unwrap into owned/shared
Can you remove the merge commit please? |
Why is the fix readme back? You should try to use the rebase strategy instead of the merge one. Allow to have way better git logs. |
force mutability for rng argument types split FFI unwrap into owned/shared fix compile error fix readme fix compile error
yeah i was trying to rebase to remove the 'merge' commit but screwed up, i can make a clean commit and delete this mess, sorry about that! |
No problem, thanks a lot for all your work. It's really awesome! |
If you don't know how to do it, you can take a look at this blog post. |
Yes that's what I was doing but I had to review changes in a lot of files due to the recent pull (the readme one) so it was a bit of a mess. i made a new clean pull request based on the current HEAD so it's fixed anyway, no worries. i'll close this one down. |
Split 'unwrap' method of FFI trait into shared (returns *const _) / owned (returns *mut _) methods, instead of just one method returning *mut _.
This allows applying ownership & mutability rules consistently across all the FFI bindings as long as the C definitions are correct (*const/*mut pointers where appropriate).
Will allow for implementation of unsafe sync/senc traits for certain types (like matrix) or use of smart pointers like Rc/RefCell etc.