[PATCH] widl: Fix duplicate typeinfo being written to typelib for enums

Nikolay Sivov nsivov at codeweavers.com
Mon Mar 10 15:34:45 CDT 2014


Spotted in http://bugs.winehq.org/show_bug.cgi?id=31724

Example: idl defines forward interface, then enum itself and interface
declaration that's actually using this enum. During generation first
interface typeinfo will be written (as it appeared first), for
referenced enum its typeinfo will be added too as part of a process of
generating interface typeinfo. After that a duplicated typeinfo for enum
will be written.

There's another problem with enums - a case without typedef is not
handled properly. Example:

---
enum name1 {};
---
...
---
INT method([in] enum name1 arg);
---

A duplicate will be generated for 'enum name1' instead of reusing
already added typeinfo for enum definition.

This patch fixes first problem, second one will need parser changes.

---
 tools/widl/write_msft.c | 3 +++
 1 file changed, 3 insertions(+)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-widl-Fix-duplicate-typeinfo-being-written-to-typelib.patch
Type: text/x-patch
Size: 578 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20140311/1b76226c/attachment.bin>


More information about the wine-patches mailing list