Rob Shearman : oleaut32: Make the code in copy_to_variant and copy_from_variant more portable.
Alexandre Julliard
julliard at winehq.org
Thu Oct 2 11:37:21 CDT 2008
Module: wine
Branch: master
Commit: 5910626aa29883a7aef313a5390cbdba6e0b6259
URL: http://source.winehq.org/git/wine.git/?a=commit;h=5910626aa29883a7aef313a5390cbdba6e0b6259
Author: Rob Shearman <robertshearman at gmail.com>
Date: Thu Oct 2 11:38:05 2008 +0100
oleaut32: Make the code in copy_to_variant and copy_from_variant more portable.
The typeof keyword isn't available on all compilers so avoid it if at
all possible.
---
dlls/oleaut32/recinfo.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/oleaut32/recinfo.c b/dlls/oleaut32/recinfo.c
index 61f6554..a4da4d3 100644
--- a/dlls/oleaut32/recinfo.c
+++ b/dlls/oleaut32/recinfo.c
@@ -59,7 +59,7 @@ static HRESULT copy_to_variant(void *src, VARIANT *pvar, enum VARENUM vt)
#define CASE_COPY(x) \
case VT_ ## x: \
- V_ ## x(pvar) = *(typeof(V_ ## x(pvar))*)src; \
+ memcpy(&V_ ## x(pvar), src, sizeof(V_ ## x(pvar))); \
break
switch(vt) {
@@ -106,7 +106,7 @@ static HRESULT copy_from_variant(VARIANT *src, void *dest, enum VARENUM vt)
#define CASE_COPY(x) \
case VT_ ## x: \
- *(typeof(V_ ## x(&var))*)dest = V_ ## x(&var); \
+ memcpy(dest, &V_ ## x(&var), sizeof(V_ ## x(&var))); \
break
switch(vt) {
More information about the wine-cvs
mailing list