[prev in list] [next in list] [prev in thread] [next in thread]
List: wine-devel
Subject: Re: Change REFIID to IID* for stack declarations in oaidl_p.c to avoid initializers being discarded
From: Mike Hearn <mike () navi ! cx>
Date: 2004-06-27 22:32:05
Message-ID: pan.2004.06.27.22.32.04.279612 () navi ! cx
[Download RAW message or body]
On Sun, 27 Jun 2004 21:13:17 +0200, Marcus Meissner wrote:
>> + It is usually generated directly by MIDL, however this file has
>> + been tweaked since then to account for slight differences in the way
>> + gcc and MSVC++ compile it. In particular, in some functions REFIIDs
>> + declared on the stack have been converted to plain IID* in order to eliminate
>> + the constness of the REFIID type, ensuring that the zero initializer is not
>> + discarded.
>> +
>> + Therefore, please do not regenerate this file.
>> +*/
>
> The comment is not understandable.
>
> Shouldn't it read '"REFIID" should not be used, because the value is not "const"'?
I don't understand that wording of the comment either unfortunately :( It's not that it
shouldn't be used, it's more that in the original generated code (I think) it was written
like this:
REFIID riid;
(REFIID ) riid = 0;
I'm not sure why MIDL did this, but as REFIID is simply
#define REFIID const IID* const
changing those instances to IID* should "fix" it without any warnings about assigning to
a readonly variable.
REFIID can still be used elsewhere though.
thanks -mike
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic