Widl Fixes

Ove Kaaven ovek at arcticnet.no
Fri Mar 14 05:04:55 CST 2003

fre, 2003-03-07 kl. 19:49 skrev Jon:
> This patch addresses some issues with widl. After applying the patch all .idl 
> files should be regenerated. These fixes are needed before my ocidl.idl can 
> be added. The last two lines of the changelog aren't seen in the wild; I 
> found them only when adding ocidl to my tree.

Could you explain the reason behind the last line, "Don't dump full
struct/enum definitions in prototypes", since this shouldn't happen in
any case. When a prototype is emitted, the parameter type is supposed to
be defined, or not; if it's not defined, t->defined is FALSE, and if
it's defined, t->written should be TRUE, either of which should lead to
the "else" clause which doesn't dump the full struct/enum definition.
If t->written isn't TRUE, why isn't it? (And if there's a good reason
for it after all, it would be cleaner to say "if (t->defined &&
!t->written && structs)" instead of adding a new "if (structs)" inside)

> There is one remaining bug in widl which I haven't yet tracked down; someone 
> more knowledgable with widl may want to look at it:
> If objidl.idl is compiled with '-b' but without '-h', the resulting header 
> contains garbage ("[][][][][][][][][]" - generated by write_array() just 
> after IPropertyStorage_Stat_Stub) in the generated header. With both flags 
> (the default for Wine) however, the output is correct. 

I thought I had fixed such occurrences. If your widl is properly
recompiled, then I'm not sure why it happens.

> Also, it would be nice if widl handled function pointers as method args...

I didn't think RPC supported this. The MS IDL I've seen just uses that
cpp_quote #if 0 ... else trick to define structures with these, and I
saw no need for widl to be smarter about it than MIDL is, considering
that function pointers doesn't map cleanly to RPC anyway. Besides, it
would be nice if our .idl files stayed compatible with MIDL.

More information about the wine-devel mailing list