widl: Do not generate C structure for empty interfaces. (try 2)

Jacek Caban jacek at codeweavers.com
Thu Jun 27 06:33:00 CDT 2013


Hi Thomas,

I tested what midl does in this case and I think the solution should be
different. When I tried to compile an empty interface, I got an error
saying that '[object] interface must derive from another [object]
interface'. That requirement is mostly enough to avoid empty vtbl.

I was wondering how IUnknown is handled by midl (since it doesn't derive
from any other iface). It seems like it's a simple name-based special
case. When I renamed the interface to IUnknown, it compiled fine and
generated vtbl the same as current widl (that is an empty struct). That
said, if such interfaces are just obscure special case, I would say we
shouldn't care. We may easily avoid them (I just sent a patch avoiding
it in mshtml).

If you want a better solution to avoid such problems in the future, I
would suggest adding an error, like midl does. This will, however,
require some more changes in Wine. At least MSHTML already has an
interface identical to IUnknown (nsISupports), which would cause the
error. This should be solvable with some tricks.

Thanks,
Jacek



More information about the wine-devel mailing list