shell32: Use FIELD_OFFSET instead of hand coding its functionality.

Michael Stefaniuc mstefani at redhat.de
Tue Nov 4 16:34:50 CST 2008


---
 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..3bb80d6 100644
--- a/dlls/shell32/shfldr_netplaces.c
+++ b/dlls/shell32/shfldr_netplaces.c
@@ -66,9 +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)
-- 
1.6.0.3
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20081104/c58ee072/attachment.pgp 


More information about the wine-patches mailing list