<div dir="ltr">You can work around this by wrapping it with a C function that uses __attribute__((noescape)).<div><br></div><div>An example of this is in my proposal &quot;Add @noescape to public library API&quot;: <a href="https://github.com/apple/swift-evolution/blob/master/proposals/0012-add-noescape-to-public-library-api.md">https://github.com/apple/swift-evolution/blob/master/proposals/0012-add-noescape-to-public-library-api.md</a></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div>Jacob Bandes-Storch<br></div></div></div></div>
<br><div class="gmail_quote">On Mon, Jan 11, 2016 at 6:29 AM, Daniel Eggert via swift-users <span dir="ltr">&lt;<a href="mailto:swift-users@swift.org" target="_blank">swift-users@swift.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I’m trying to wrap<br>
<br>
  public typealias dispatch_data_applier_t = (dispatch_data_t!, Int, UnsafePointer&lt;Void&gt;, Int) -&gt; Bool<br>
  public func dispatch_data_apply(data: dispatch_data_t, _ applier: dispatch_data_applier_t) -&gt; Bool<br>
<br>
with<br>
<br>
  func forEach(@noescape body: (UInt8) throws -&gt; ()) rethrows<br>
<br>
but since dispatch_data_apply() promises to be @noescape (in the documentation), but doesn’t declare it, I’m stuck. Is there a way to tell the compiler: Really, this will not escape?<br>
<br>
/Daniel<br>
<br>
_______________________________________________<br>
swift-users mailing list<br>
<a href="mailto:swift-users@swift.org">swift-users@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-users" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-users</a><br>
</blockquote></div><br></div></div>