How can I use commercial at sign in Objective-C macro?
I know it is not recommended, but seems it is possible somehow? Since libextobjc
provides @weakify
, @strongify
, etc...
How can I use commercial at sign in Objective-C macro?
I know it is not recommended, but seems it is possible somehow? Since libextobjc
provides @weakify
, @strongify
, etc...
libextobjc
uses preprocessor trickery to make you think it's an @command
.
#define weakify(...) \
try {} @finally {} \
metamacro_foreach_cxt(ext_weakify_,, __weak, __VA_ARGS__)
Note the missing @
on the try
.
So @weakify
expands into @try {} @finally {} [injected code]
.
You could use the same trick, but I suggest you stick with plain macros.