Skip to content

swift_arrayInitWithCopy(________)

0x41c edited this page Feb 28, 2022 · 1 revision

swift_arrayInitWithCopy(_:_:_:_:)

Taking an empty heap object and an already initialized one, this initializes the empty one by copying a certain amount of children from the initialized one. If the source object is POD, it gets copied using memcpy. If not, it utilizes the provided witness functions located in the metadata's witness table.

@_silgen_name("swift_arrayInitWithCopy")
public func swift_arrayInitWithCopy(
    _ destination: UnsafeRawPointer,
    _ source: UnsafeRawPointer,
    _ count: Int,
    _ self: Any.Type
)
  • C++ Template Values:

    • ArrayDest::Init
    • ArraySource::Copy
    • ArrayCopy::NoAlias

Parameters

  • destination: The destination heap object.
  • source: The source heap object.
  • count: Amount of items in the source object.
  • self: The destinations initialized metadata.
Types
Protocols
Global Typealiases
Global Functions
Clone this wiki locally