e.g. using the same kind of custdata in multiple interfaces
Signed-off-by: Kevin Puetz PuetzKevinA@JohnDeere.com --- tools/widl/write_msft.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/tools/widl/write_msft.c b/tools/widl/write_msft.c index 87863e25fb..70d123813f 100644 --- a/tools/widl/write_msft.c +++ b/tools/widl/write_msft.c @@ -1263,18 +1263,25 @@ static void write_default_value(msft_typelib_t *typelib, type_t *type, expr_t *e static HRESULT set_custdata(msft_typelib_t *typelib, REFGUID guid, int vt, const void *value, int *offset) { - MSFT_GuidEntry guidentry; int guidoffset; int custoffset; int *custdata; int data_out; + int hash_key;
- guidentry.guid = *guid; + hash_key = ctl2_hash_guid(guid); + guidoffset = ctl2_find_guid(typelib, hash_key, guid); + if(guidoffset == -1) { + // add GUID that was not already present + MSFT_GuidEntry guidentry; + guidentry.guid = *guid;
- guidentry.hreftype = -1; - guidentry.next_hash = -1; + guidentry.hreftype = -1; + guidentry.next_hash = -1; + + guidoffset = ctl2_alloc_guid(typelib, &guidentry); + }
- guidoffset = ctl2_alloc_guid(typelib, &guidentry); if(vt == VT_BSTR) write_string_value(typelib, &data_out, value); else
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=76629
Your paranoid android.
=== debiant (build log) ===
../../../../wine/dlls/oleaut32/tests/typelib.c:5776:24: error: empty scalar initializer ../../../../wine/dlls/oleaut32/tests/typelib.c:5789:24: error: empty scalar initializer ../../../../wine/dlls/oleaut32/tests/typelib.c:5804:24: error: empty scalar initializer ../../../../wine/dlls/oleaut32/tests/typelib.c:5817:24: error: empty scalar initializer ../../../../wine/dlls/oleaut32/tests/typelib.c:5832:24: error: empty scalar initializer ../../../../wine/dlls/oleaut32/tests/typelib.c:5845:24: error: empty scalar initializer ../../../../wine/dlls/oleaut32/tests/typelib.c:5860:24: error: empty scalar initializer ../../../../wine/dlls/oleaut32/tests/typelib.c:5938:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:5954:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:5955:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:5974:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:5975:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:5977:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:5978:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:5999:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:6000:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:6002:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:6003:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:6005:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:6006:9: error: initializer element is not computable at load time Task: The win32 Wine build failed
=== debiant (build log) ===
../../../../wine/dlls/oleaut32/tests/typelib.c:4921:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:5565:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:5579:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:5591:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:5604:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:5620:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:5640:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:5665:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:5685:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:5697:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:5709:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:5721:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:5733:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:5745:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:5758:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:5776:24: error: empty scalar initializer ../../../../wine/dlls/oleaut32/tests/typelib.c:5781:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:5789:24: error: empty scalar initializer ../../../../wine/dlls/oleaut32/tests/typelib.c:5795:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:5804:24: error: empty scalar initializer ../../../../wine/dlls/oleaut32/tests/typelib.c:5809:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:5817:24: error: empty scalar initializer ../../../../wine/dlls/oleaut32/tests/typelib.c:5823:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:5832:24: error: empty scalar initializer ../../../../wine/dlls/oleaut32/tests/typelib.c:5837:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:5845:24: error: empty scalar initializer ../../../../wine/dlls/oleaut32/tests/typelib.c:5851:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:5860:24: error: empty scalar initializer ../../../../wine/dlls/oleaut32/tests/typelib.c:5868:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:5938:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:5954:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:5974:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:5977:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:5999:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:6002:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:6005:9: error: initializer element is not computable at load time Task: The wow64 Wine build failed