FFIArray.fromData

Zero-copy conversion of a native D slice to an FFIArray. The resulting FFIArray has the same lifetime as the native D slice, so a stack allocated slice will also cause the FFIArray to become invalid when leaving its scope. DIP1000 should help avoid such issues.

  1. FFIArray fromData(T[] data)
    struct FFIArray(T)
    static @trusted nothrow pure @nogc
    fromData
    (
    return T[] data
    )
  2. FFIArray fromData(T[n] data)

Meta