Reputation: 2605
I have this line in a header file at an objective c project.
static const char my_bytes[] = { -30, 10, 90}
I want to write it in swift, how can I do it?
Upvotes: 0
Views: 248
Reputation: 93161
let my_bytes : [CChar] = [-30, 10, 90]
CChar
is simply an alias for Int8
. You can read more about it in Interacting with C API.
Upvotes: 2