COM implementation clean up

Alexander Kochetkov al.kochet at gmail.com
Wed Nov 24 03:10:03 CST 2010


Hi all,

The code like
static inline MyObject *impl_from_IMyInterface(IMyInterface *iface)
{
    return (MyObject*)((char*)iface - FIELD_OFFSET(MyObject,
IMyInterface_iface));
}

could be replaced with
static inline MyObject *impl_from_IMyInterface(IMyInterface *iface)
{
    return container_of(MyObject, IMyInterface_iface);
}

Cheers,
Alexander.



More information about the wine-devel mailing list