Module: wine Branch: master Commit: 3591663ccafb3991f747b1ce8ef9e2a2a4f2465c URL: http://source.winehq.org/git/wine.git/?a=commit;h=3591663ccafb3991f747b1ce8e... Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Wed Nov 5 10:17:13 2008 +0100 shell32: Use FIELD_OFFSET instead of hand coding its functionality. --- dlls/shell32/shfldr_netplaces.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/shell32/shfldr_netplaces.c b/dlls/shell32/shfldr_netplaces.c index d0e9833..c661c51 100644 --- a/dlls/shell32/shfldr_netplaces.c +++ b/dlls/shell32/shfldr_netplaces.c @@ -66,8 +66,8 @@ static const IShellFolder2Vtbl vt_ShellFolder2; static const IPersistFolder2Vtbl vt_NP_PersistFolder2; -#define _IPersistFolder2_Offset ((int)(&(((IGenericSFImpl*)0)->lpVtblPersistFolder2))) -#define _ICOM_THIS_From_IPersistFolder2(class, name) class* This = (class*)(((char*)name)-_IPersistFolder2_Offset); +#define _ICOM_THIS_From_IPersistFolder2(class, name) class* This = \ + (class*)(((char*)name) - FIELD_OFFSET(IGenericSFImpl, lpVtblPersistFolder2)) #define _IUnknown_(This) (IUnknown*)&(This->lpVtbl) #define _IShellFolder_(This) (IShellFolder*)&(This->lpVtbl)