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

IIRC passing Obj-C object pointers in C structs is disallowed or discouraged by ARC.
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.