Re: [swift-users] Annotating C APIs without changing the original header files

2017-05-14 Thread Geordie Jay via swift-users
Cheers, Geordie Daniel Dunbar schrieb am Fr. 12. Mai 2017 um 20:33: > We don't have explicit support for api notes in SwiftPM. > Does that mean there is "unexplicit" support (maybe via swift build command line arguments)? I don't mind if I have to make a build

Re: [swift-users] Annotating C APIs without changing the original header files

2017-05-13 Thread Guillaume Lessard via swift-users
> On May 12, 2017, at 12:33, Daniel Dunbar via swift-users > wrote: > > We don't have explicit support for api notes in SwiftPM. > It would also be useful for cases when the latest versions of clang can’t be counted on for Linux deployments (3.6 is considered

Re: [swift-users] Annotating C APIs without changing the original header files

2017-05-12 Thread Daniel Dunbar via swift-users
We don't have explicit support for api notes in SwiftPM. We discussed it, and it something which probably makes sense, but no one has worked on a design or implementation yet. - Daniel > On May 12, 2017, at 11:32 AM, Michael Gottesman via swift-users > wrote: > >

Re: [swift-users] Annotating C APIs without changing the original header files

2017-05-12 Thread Geordie J via swift-users
To continue this thread: I managed to annotate a bunch of C APIs with modulename.apinotes. This works with Xcode (to a certain degree - pointers, enums, and especially OpaquePointers are tricky). I’m now trying to build my package with SwiftPM and it doesn’t seem to recognise the apinotes file.

Re: [swift-users] Annotating C APIs without changing the original header files

2017-05-07 Thread Geordie Jay via swift-users
I'm having the same issue. The renames seem to work, as in they disappear from the global scope with a fixit to rename to the new (namespaced) version if I type in the name manually, but they don't appear as static members of the enum type, regardless of how I call them. Would appreciate some help

Re: [swift-users] Annotating C APIs without changing the original header files

2017-05-07 Thread Rick Mann via swift-users
I'm trying to use apinotes for this third-party C library (call it "Lib.dylib"). It has an enum lgs_error_t: typedef enum { lgs_error_none = 0, lgs_error_invalid_handle = -1, lgs_error_null = -2, lgs_error_invalid_parameter = -3, lgs_error_invalid_operation = -4,

Re: [swift-users] Annotating C APIs without changing the original header files

2017-05-04 Thread Geordie Jay via swift-users
Fantastic! Thanks for the info, this is great news. 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) Ideally this would just look

Re: [swift-users] Annotating C APIs without changing the original header files

2017-05-04 Thread Geordie Jay via swift-users
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 ? Douglas Gregor schrieb am Fr. 5. Mai 2017 um 01:55: > > On May 3, 2017, at 4:10

Re: [swift-users] Annotating C APIs without changing the original header files

2017-05-04 Thread Douglas Gregor via swift-users
> On May 3, 2017, at 4:10 PM, Geordie J via swift-users > wrote: > > Hi everyone, > > 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

[swift-users] Annotating C APIs without changing the original header files

2017-05-04 Thread Geordie J via swift-users
Hi everyone, 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. The question is: is it