On Sat, Oct 31, 2015 at 02:31:38PM +0800, Dmitry Timoshkov wrote:
diff --git a/tools/widl/write_msft.c b/tools/widl/write_msft.c index daa0366..dc8b124 100644 --- a/tools/widl/write_msft.c +++ b/tools/widl/write_msft.c @@ -494,10 +494,22 @@ static int ctl2_alloc_guid( MSFT_GuidEntry *guid_space; int hash_key;
chat("adding uuid {%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}\n",
guid->guid.Data1, guid->guid.Data2, guid->guid.Data3,
guid->guid.Data4[0], guid->guid.Data4[1], guid->guid.Data4[2], guid->guid.Data4[3],
guid->guid.Data4[4], guid->guid.Data4[5], guid->guid.Data4[6], guid->guid.Data4[7]);
hash_key = ctl2_hash_guid(&guid->guid);
offset = ctl2_find_guid(typelib, hash_key, &guid->guid);
- if (offset != -1) return offset;
if (offset != -1)
{
warning("duplicate uuid {%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}\n",
guid->guid.Data1, guid->guid.Data2, guid->guid.Data3,
guid->guid.Data4[0], guid->guid.Data4[1], guid->guid.Data4[2], guid->guid.Data4[3],
guid->guid.Data4[4], guid->guid.Data4[5], guid->guid.Data4[6], guid->guid.Data4[7]);
return -1;
}
offset = ctl2_alloc_segment(typelib, MSFT_SEG_GUID, sizeof(MSFT_GuidEntry), 0);
This still has problems. For example see the idl below. Also note that this is the cause of the warnings in httpresquest.idl .
Huw.
import "objidl.idl"; [uuid(12345678-0000-0000-0000-000000000000)] library foo { typedef [uuid(12345678-9ab0-0000-0000-000000000000)] struct f {int x;} f; [uuid(12345678-9abc-0000-0000-000000000000)] interface IMy : IUnknown { HRESULT foo([in]f *ptr); } }
Huw Davies huw@codeweavers.com wrote:
This still has problems. For example see the idl below. Also note that this is the cause of the warnings in httpresquest.idl .
Huw.
import "objidl.idl"; [uuid(12345678-0000-0000-0000-000000000000)] library foo { typedef [uuid(12345678-9ab0-0000-0000-000000000000)] struct f {int x;} f; [uuid(12345678-9abc-0000-0000-000000000000)] interface IMy : IUnknown { HRESULT foo([in]f *ptr); } }
I'd say that this is yet another bug discovered by this patch, and these bugs have nothing to do with the patch itself, they do exist already.
I certainly can have a look at this bug in typelib generation, but I don't think that it's really correct to blame my patch for making existing bugs in typelib generation visible, and because of that reject the patch inclusion.