10 Jul
2006
10 Jul
'06
10:24 a.m.
Juan Lang <juan_lang(a)yahoo.com> writes:
+#define DECL_IFACE(ifc) const I##ifc##Vtbl *lp##ifc##Vtbl; + +#define IFACE2IMPL(cls,ifc,iface) ((cls*)((BYTE*)(iface)-offsetof(cls,lp##ifc##Vtbl))) +#define IMPL2IFACE(ifc,x) ((I##ifc*)&(x)->lp##ifc##Vtbl)
Please avoid that sort of macros, it makes grepping for things a lot harder. Just spell things out explicitly, and for IFACE2IMPL define a couple of inline functions instead. -- Alexandre Julliard julliard(a)winehq.org