1)
#define offsetof(s, m) (size_t)&(((s *)0)->m)
2)
#define OBJECT_HEAD_ADDRESS(ClassName,MemberName,Addre) \
Addre - offsetof(ClassName, MemberName)
2022-08-28 13:16:03
1)
#define offsetof(s, m) (size_t)&(((s *)0)->m)
2)
#define OBJECT_HEAD_ADDRESS(ClassName,MemberName,Addre) \
Addre - offsetof(ClassName, MemberName)