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
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
> 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
Thanks!
> On May 4, 2017, at 16:44 , Philippe Hausler wrote:
>
> Not sure on exactly how you are wanting to use this but you could approach
> this like:
>
> let bytes: [UInt8] = [ 0xC0, 0xC0, 0xA1, 0x00, 0xC0, 0xC0, 0xA1, 0x00]
> let slice = bytes[0..<4]
>
Not sure on exactly how you are wanting to use this but you could approach this
like:
let bytes: [UInt8] = [ 0xC0, 0xC0, 0xA1, 0x00, 0xC0, 0xC0, 0xA1, 0x00]
let slice = bytes[0..<4]
slice.withUnsafeBytes { buffer in
let d = Data(bytesNoCopy: UnsafeMutableRawPointer(mutating:
Is it possible to make a (immutable) Data() object from a slice of a [UInt8]
and avoid copying the data?
--
Rick Mann
rm...@latencyzero.com
___
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users
Hi,
My understanding is that Swift is not yet running on RHEL based distros. If
that is correct, I'd like to know whether it's possible (and practical) to
compile a Swift program on Ubuntu such that the binary can be run on other
Linux distros such as Centos, RHEL, etc.
Thanks,
Lane
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
Hi again, another question:
Is it possible to use .gyb files to automatically generate repetitive code
outside of the stdlib? Preferably in a SwiftPM package? Here’s an example of
what I’ve been using it for:
https://github.com/SwiftAndroid/swift-jni/blob/master/JNIFields.swift.gyb
> On May 2, 2017, at 12:35 PM, Kelvin Ma via swift-users
> wrote:
>
> I’m wondering why the String.CharacterView structure has a reserveCapacity(:)
> member?
Because it conforms to the RangeReplaceableCollection protocol, which requires
`reserveCapacity(_:)`.
More
The stack trace printed by the process will never include file and line
numbers. Swift and ObjC work the same way here.
You want to find the crash report generated by the OS. Either it will have file
and line numbers already, or it will contain enough information to look up the
file and line
It works now, but it's not correct. I wish there were a correct way available.
Guillaume Lessard
> On May 3, 2017, at 21:30, Colin Barrett via swift-users
> wrote:
>
> I haven't used this in production, but this repository looks pretty
> promising. It's more or less
12 matches
Mail list logo