# Passing a MutableSpan to an annotated C function

**URL:** <https://forums.swift.org/t/passing-a-mutablespan-to-an-annotated-c-function/89454>\
**Category:** Using Swift\
**Tags:** memory-safety, c-interop, interoperability\
**Created:** [September 9, 2026, 4:19pm UTC](https://forums.swift.org/t/passing-a-mutablespan-to-an-annotated-c-function/89454 "2026-09-09T16:19:27Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![j-f1](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/j-f1/32/12287_2.png) [@j-f1](https://forums.swift.org/u/j-f1)\
**Post date:** [September 11, 2026, 12:56pm UTC](https://forums.swift.org/t/passing-a-mutablespan-to-an-annotated-c-function/89454/8 "2026-09-11T12:56:38Z")

</div>

I believe you could replace `UniqueArray` with `Array` there and it would work the same way. Does it not?

And the `UniqueBox` does seem to be currently necessary but there is [a pitch](https://forums.swift.org/t/pitch-span-over-a-single-value/89189) for `Span(ofOne: foo)` which will do the same thing a little more directly.

---

_[View the full topic](https://forums.swift.org/t/passing-a-mutablespan-to-an-annotated-c-function/89454)._
