From 5c760c2d2202b13c15cb19ca97a230a8fa2517fd Mon Sep 17 00:00:00 2001 From: Jeffrey Morlan Date: Sun, 21 Dec 2008 00:43:56 +0000 Subject: [PATCH] widl: Don't assume that host void* is the same size as target void* svn path=/trunk/; revision=38212 --- reactos/tools/widl/typegen.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/reactos/tools/widl/typegen.c b/reactos/tools/widl/typegen.c index 9bb698977f6..ccbd1f48af6 100644 --- a/reactos/tools/widl/typegen.c +++ b/reactos/tools/widl/typegen.c @@ -823,7 +823,13 @@ size_t type_memsize(const type_t *t, unsigned int *align) } else if (is_ptr(t) || is_conformant_array(t)) { - size = sizeof(void *); +#if defined(TARGET_i386) + size = 4; +#elif defined(TARGET_amd64) + size = 8; +#else +#error Unsupported CPU +#endif if (size > *align) *align = size; } else switch (t->type)