Fantastic! Thanks for the info, this is great news.<br><br>While I have you, I'm interested in annotating function pointers. Specifically, the JNI environment instance is a pointer to a pointer, so as is you have to type env.pointee.pointee.FunctionName(env, param1, param2)<br><br>Ideally this would just look like env.FunctionName(param1, param2). It's a long shot but is this goal at all reasonable via annotations alone?<br><br>Cheers,<br>Geordie<br><div class="gmail_quote"><div dir="ltr">Douglas Gregor <<a href="mailto:dgregor@apple.com">dgregor@apple.com</a>> schrieb am Fr. 5. Mai 2017 um 01:59:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><blockquote type="cite"><div>On May 4, 2017, at 4:57 PM, Geordie Jay <<a href="mailto:geojay@gmail.com" target="_blank">geojay@gmail.com</a>> wrote:</div><br class="m_2715878561620984759Apple-interchange-newline"><div>Great, thanks for reminding me of this feature. I couldn't see how it could be used outside of the stdlib though, is it possible to use apinotes when simply linking a C module via its modulemap ?<br></div></blockquote><div><br></div></div></div><div style="word-wrap:break-word"><div>You can put</div><div><br></div><div><span class="m_2715878561620984759Apple-tab-span" style="white-space:pre-wrap">        </span><modulename>.apinotes</div><div><br></div><div>into the same directory as the module map.</div><div><br></div><div><span class="m_2715878561620984759Apple-tab-span" style="white-space:pre-wrap">        </span>- Doug</div></div><div style="word-wrap:break-word"><div><br><blockquote type="cite"><div><div class="gmail_quote"><div dir="ltr">Douglas Gregor <<a href="mailto:dgregor@apple.com" target="_blank">dgregor@apple.com</a>> schrieb am Fr. 5. Mai 2017 um 01:55:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><blockquote type="cite"><div>On May 3, 2017, at 4:10 PM, Geordie J via swift-users <<a href="mailto:swift-users@swift.org" target="_blank">swift-users@swift.org</a>> wrote:</div><br class="m_2715878561620984759m_-6086971169769132268Apple-interchange-newline"><div><div>Hi everyone,<br><br>I’m about to start on another big project with Swift on Android and would like to annotate that JNI headers as much as possible before I do: specifically I’d like to make _Nonnull and CF_SWIFT_NAME annotations to the headers found in a user's jni.h.<br><br>The question is: is it possible to annotate headers this without changing the original header files? Specifically I’m looking for an options that allows annotations in a separate file, probably one that is read when loading the package’s module.modulemap.<br><br>I’d like to distribute the annotations in a SwiftPM package that also exposes the original (hopefully annotated) headers. Up until now I’ve been using Swift to override methods in code, but this isn’t as clean or extensible and I fear it may have other (particularly performance) implications.<br><br>I guess the alternative would be to just maintain and distribute a modified version of jni.h with the annotations, but that would be a "last resort” option.<br></div></div></blockquote></div><br><div><br></div></div><div style="word-wrap:break-word"><div>This is the role of API notes, which you can see here:</div><div><br></div><div><span class="m_2715878561620984759m_-6086971169769132268Apple-tab-span" style="white-space:pre-wrap">        </span><a href="https://github.com/apple/swift/tree/master/apinotes" target="_blank">https://github.com/apple/swift/tree/master/apinotes</a></div><div><br></div><div>with some rough documentation-in-source here:</div><div><br></div><div><span class="m_2715878561620984759m_-6086971169769132268Apple-tab-span" style="white-space:pre-wrap">        </span><a href="https://github.com/apple/swift-clang/blob/stable/lib/APINotes/APINotesYAMLCompiler.cpp" target="_blank">https://github.com/apple/swift-clang/blob/stable/lib/APINotes/APINotesYAMLCompiler.cpp</a></div><div><br></div><div><span class="m_2715878561620984759m_-6086971169769132268Apple-tab-span" style="white-space:pre-wrap">        </span>- Doug</div><div><br></div></div></blockquote></div>
</div></blockquote></div><br></div></blockquote></div>