首页 新闻 赞助 找找看

Linux c 宏定义

0
悬赏园豆:20 [待解决问题]
请详细描述下面宏定义的作用?

#define
INIT(this, ...) { (this) = malloc(sizeof(*(this))); \
*(this) = (typeof(*(this))){ __VA_ARGS__ }; }

#define METHOD(iface, name, ret, this, ...) \
static ret name(union {iface *_public; this;} \
__attribute__((transparent_union)), ##__VA_ARGS__); \
static typeof(name) *_##name = (typeof(name)*)name; \
static ret name(this, ##__VA_ARGS__)
zhangrxiang的主页 zhangrxiang | 初学一级 | 园豆:181
提问于:2018-01-11 15:12
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册