From: Ove Kaaven ovehk@ping.uio.no On 6 Dec 2002, Alexandre Julliard wrote:
Ove Kaaven ovehk@ping.uio.no writes:
- make widl not use macros at all, but emit full C and C++
definitions
directly (this is what midl.exe does, it seems)
I'd say this is the way to go if it's not too painful, it seems to be the most flexible. In any case obj_base.h has to go, so if we keep the macros they have to be put inside one of the standard headers, which wouldn't be very clean.
We may have to keep the macros anyway, there are headers that use them that can't be generated from IDL, like the DirectX headers. I suppose they could be converted to using the MS-style objbase.h macros by perl scripts or by rewriting them from api headers or something, but someone else would have to take on that task, I think.
But I'll try to add a widl header generation mode that don't use macros, then.
I don't really care whether the ICOM_ macros go or stay in the current form, but if they stay, they should at least be corrected in the following sense.
Presently, a typical macro in obj_base.h is
#define ICOM_METHOD4(ret,xfn,ta,na,tb,nb,tc,nc,td,nd) \ public: virtual ret CALLBACK (xfn)(ta a,tb b,tc c,td d) = 0;
Note that we have na, nb, ... on the 'left' matching with a, b, ... on the 'right'.
Not that this causes problems, it's just that it isn't right. And if the stuff gets stripped, it is a moot point anyway. If anyone thinks it is worth any effort, I can easily create a patch.
-- Jeff S
_________________________________________________________________ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus