widl #21: better guess at alignments

Huw D M Davies h.davies1 at physics.ox.ac.uk
Fri Jan 21 06:55:09 CST 2005


        Huw Davies <huw at codeweavers.com>
        Bit 0x0200 always appears to be set in the typeinfo's
        typekind/alignment member.

-- 
Huw Davies
huw at codeweavers.com
--- tools/widl/write_msft.c	2005-01-21 12:49:46.173531032 +0000
+++ tools/widl/write_msft.c	2005-01-21 12:51:18.901691501 +0000
@@ -1346,8 +1346,7 @@
     if (!cbAlignment) return;
     if (cbAlignment > 16) return;
 
-    typeinfo->typeinfo->typekind &= ~0xffc0;
-    typeinfo->typeinfo->typekind |= cbAlignment << 6;
+    typeinfo->typeinfo->typekind &= ~0xf800;
 
     /* FIXME: There's probably some way to simplify this. */
     switch (typeinfo->typeinfo->typekind & 15) {
@@ -1529,7 +1528,7 @@
 
     msft_typeinfo->typeinfo = typeinfo;
 
-    typeinfo->typekind |= entry->kind | 0x20;
+    typeinfo->typekind |= entry->kind | 0x220;
     set_alignment(msft_typeinfo, 4);
 
     switch (entry->kind) {



More information about the wine-patches mailing list