extern is a hand-written signature. Why does not parse C headers. defer frees what C allocated, because the arena only frees what it created.
extern funcdeclares a C function, hand-written signature. Why does not free memory allocated by C.deferdoes. No parsed header.
An
externtakes and returnsint,stringand[]u8. Any other type is refused.
A
stringpassed to C is the pointer to the bytes, then their count. Why does not add the null byte.
A
[]u8passed to C is the pointer to the bytes, then their count. These bytes survive the call. C writes into them. It does not allocate them.
A
stringor a[]u8returned by C is the pointer to the bytes, then their count. Why makes a value of it. It does not add the null byte and does not attach these bytes to an arena.
Diagnostic. extern attend int, string ou []u8 — a type other than int, string or []u8 in the signature.