Add mappings for Udev Library.#1200
Add mappings for Udev Library.#1200dbwiddis wants to merge 4 commits intojava-native-access:masterfrom
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.
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.
Gotcha, I missed that subtle distinction.
|
Merged - thank you |
See references here.