Y
Hacker News
new
|
ask
|
show
|
jobs
by
pornel
5228 days ago
You can use C99 struct literals:
return (struct x){a,b};
Small structs may be passed in registers.
http://stackoverflow.com/a/3355560/27009
1 comments
drpancake
5228 days ago
IIRC passing Obj-C object pointers in C structs is disallowed or discouraged by ARC.
link
DrJokepu
5228 days ago
You have to explicitly bridge them in or out of ARC and indicate the ownership rules. Sometimes, for example when you're interfacing straight C code, you have no other option.
link