widl: Do not generate empty Vtbl structure for empty interfaces.

Thomas Faber thfabba at gmx.de
Tue Jun 25 16:34:23 CDT 2013

On 2013-06-25 21:11, Alexandre Julliard wrote:
> Thomas Faber <thfabba at gmx.de> writes:
>> An alternative solution would be not to generate a vtable structure at all,
>> and instead add a dummy member to the class directly. That would be in line
>> with what the defined(__cplusplus) && !defined(CINTERFACE) case results in,
>> but require a slightly larger change to widl.
> I'm not sure it makes sense to even define a C structure at all, since
> there's nothing you can do with it.

Hmm. The only thing I could think of would be someone making a pointer
to such an object, to later cast to a derived class.
Since there's a typedef generated earlier in the file, the struct
should already be known (as an incomplete type), so that scenario would
work even without the struct definition.

So... I agree. I'll send an updated patch that won't generate the
structure at all.

More information about the wine-devel mailing list