[Bug 47035] widl generates typelib file with enums multiply defined

wine-bugs at winehq.org wine-bugs at winehq.org
Fri Apr 19 17:52:22 CDT 2019


https://bugs.winehq.org/show_bug.cgi?id=47035

--- Comment #3 from Zebediah Figura <z.figura12 at gmail.com> ---
Generally I think we want to avoid duplicating types in widl, and just rely on
pointer equality to test if a type was already written (to a typelib, header,
eventually also NDR format string). This means getting rid of duptype(), which
is only used in a couple places, but they're kind of tricky to get rid of. I
think it'd be a matter of moving type qualifiers and specifiers out of the type
structure itself and into the decl_spec stucture, and then propagating those
upward a layer to the typedef, arg, declaration, etc.

The other option is that we don't rely on pointer equality to test if two types
are equal, and instead do a deep comparison, i.e. along the lines of
type_is_equal(). (Despite the comment in that function I'm not sure we'd need
to do deep inspection in that case.) I'm a little lukewarm about this, though,
inasmuch as it means we can't as easily store information like offset / whether
the type was written in the type structure itself (i.e. we can, but every time
we look it up we'd have to search the namespace for another type that was
written, if this one wasn't.)

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list