shell32: Use FIELD_OFFSET instead of hand coding its functionality. (Resend)

Michael Stefaniuc mstefani at redhat.de
Wed Nov 5 03:17:13 CST 2008


---
Bah ... recountdiff tricked me and made the patch not apply.


 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)
-- 
1.6.0.1
-------------- 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/20081105/83eefd9f/attachment.pgp 


More information about the wine-patches mailing list