Add CFEqual, CFDictionaryRef.ByReference, CFStringRef.ByReference to CoreFoundation#1433
Conversation
|
macos-latest failure is unrelated, looks like com.sun.jna.platform.mac.XAttrUtilTest#testWriteAlignedCliTool is blinking |
dbwiddis
left a comment
There was a problem hiding this comment.
See comments inline.
I'm also thinking there's a potential to implement the ByReference bits at the CFTypeRef level, with a CFTypeRef return type and an internal conditional return type based on the CFType: in this case, there's no exception, and the user can just cast the return to use it. See Advapi32Util.registryGetValue() and Cfgmgr32Util.CM_Get_DevNode_Registry_Property() for examples.
|
If we actually want to write type-safe code, IMHO casting types is no-go. It is, however, possible to write typed code if we remove the parameter-less constructor: https://gist.github.com/shalupov/31c53bbdff73a412662507ef19383973 downsides: clunky management of value factories and type-checking at setValue |
dbwiddis
left a comment
There was a problem hiding this comment.
OK, looks good from here!
…erence fixes after review java-native-access#1433
No description provided.