[Swift] Add parsing from unowned UnsafeMutableRawPointer for ByteBuffer (#5981)
authorLiu Liu <i@liuliu.me>
Tue, 23 Jun 2020 00:05:36 +0000 (17:05 -0700)
committerGitHub <noreply@github.com>
Tue, 23 Jun 2020 00:05:36 +0000 (17:05 -0700)
commitf35184aef9395d61f07a947fb2749fe1d734053b
treece54a6565e57a2c8c88e5c3c129ba420b6a1efb9
parentb124b762587884fd1f22884c7893fe3998507707
[Swift] Add parsing from unowned UnsafeMutableRawPointer for ByteBuffer (#5981)

* RFC: Add ExternalStorage for ByteBuffer in Swift implementation

This PR proposed one more API for ByteBuffer such that no copy is
required to parse FlatBuffers content. This API has limited use, but for
cases that you need to read part of the flatbuffers' data to decide
whether you want to parse / copy the full buffer out, it is useful.

* Use a variable rather than protocol.

* Revert grouping changes from the other PR.

* Add unit test to read from unowned UnsafePointer.

* Manifest changed.
swift/Sources/FlatBuffers/ByteBuffer.swift
tests/FlatBuffers.Test.Swift/Tests/FlatBuffers.Test.SwiftTests/FlatBuffersMonsterWriterTests.swift
tests/FlatBuffers.Test.Swift/Tests/FlatBuffers.Test.SwiftTests/XCTestManifests.swift