the.bay.news

Passing a MutableSpan to an annotated C function

Swift Forums
Passing a MutableSpan to an annotated C function
Hello! I'm trying to interoperate with C in a safe way by annotating the API to generate safe wrappers but I don't know how to pass a mutable span. To make my issue obvious I created this super simple C module: int mini_sum(const unsigned char *in32); int mini_fill(unsigned char *out64, const unsigned char *in32); With these annotations: --- Name: CMini Functions: - Name: mini_sum Parameters: - Position: 0 NoEscape: true BoundsSafety: { Kind: counted_by, BoundedBy: 32 } - Name: ...

0 comments

Sign in to join the discussion — your thebay.events account works here.

No comments yet.