-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Add mappings for Udev Library. #1200
Conversation
The bindings looks sane to me. Looking at the API I'm thinking, that this is basicly a OO model. This might be an optional enhancement (not finished, but should give the idea): |
Great idea. I'll update. One thing to note, the docs specify return types for both the |
Hmm, I expect the "double-free" is me trying to release parent reference. This doc is confusing but I suppose it means "don't unref it"...
|
719ecb4
to
67030b9
Compare
Sorry for the 8 or 9 force pushes. The good news is my own appveyor setup is pretty strict on javadocs. The bad news is that it was killing the build too quickly for me to see the errors in the logs and I kept finding and fixing a few at a time. It should be good to go now. |
* @param udev | ||
* A udev context object. | ||
*/ | ||
void udev_unref(UdevContext udev); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not correct - the definition needs to match the C version. I dropped the return in my suggestion for the OO binding - but only on the java level, not on the Java<->C interface level. Depending on how the return value is returned, memory might need to be reserved for this. If it does not happen, strange issues could result, so please return the UdevContext here.
The same is true for all callsites, where Structure was turned to void.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotcha, I missed that subtle distinction.
Merged - thank you |
See references here.