Module: wine Branch: master Commit: 5910626aa29883a7aef313a5390cbdba6e0b6259 URL: http://source.winehq.org/git/wine.git/?a=commit;h=5910626aa29883a7aef313a539...
Author: Rob Shearman robertshearman@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) {