2009/1/1 Michael Karcher wine@mkarcher.dialup.fu-berlin.de:
Am Donnerstag, den 01.01.2009, 20:43 +0000 schrieb Rob Shearman:
No, the [string] attribute in this case in redundant and it should apply to the first pointer in the parameter.
Now, that makes sense.
I'm guessing by the change that you had to make that widl doesn't handle this too well...
Seems so. I don't want to hurt anyone, but I somehow get the impression that the quality of widl is somewhere around works-for-me.
The trouble in this case was a corner case that was only tested by some bad IDL. Corner cases are never easy to test for and the best way of fixing bugs is to eliminate them as much as possible. To that end I have some patches queued up that add more of an API to access the parse tree to try to make the generator code more robust. In particular, the C generator code could probably do with a function like type_get_ndr_type that deals with the nuances of detecting strings, user-types, context handles, interface pointers, etc and that would likely have fixed several of the issues you reported.
In terms of testing, I want to find and fix these issues before users (i.e. other developers, like you) find them. To that end, I think a good test may be to run "widl -p" on as many of the files in include/ as possible and fix/log any issues that come up, and then to compile each file. There should be no errors in either case, since errors should be reported up front (i.e. even for just generating a header file or a syntax check). I also plan to write a fuzzer for widl someday - if anyone knows of a free fuzzer framework out there somewhere then that would be useful.