www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Holy Win32 Voids, Batman!

reply kris <foo bar.com> writes:
W00t! Poll Time!

All you Win32 developers out there -- how do you feel about marking all 
instances of Win32 structs like so:

POINT p = void;
...
...
...
TV_ITEM tv = void;
...
TEXTMETRIC tm = void;

ensuring that there is an "= void;" affixed to each decl? If you're all 
happy with that, we can eliminate those issues with Win32 bloat without 
a fix from Walter. Woohoo!

All those in favour please say 'aye'. All those not in favour say 'nae'.

Those in favour of a true fix say nothing at all -- that way, we can 
truthfully assert most ppl want a real fix instead ;)

(see related posts also)
Jan 23 2007
parent reply Pragma <ericanderton yahoo.removeme.com> writes:
kris wrote:
 W00t! Poll Time!
 
 All you Win32 developers out there -- how do you feel about marking all 
 instances of Win32 structs like so:
 
 POINT p = void;
 ...
 ...
 ...
 TV_ITEM tv = void;
 ...
 TEXTMETRIC tm = void;
 
 ensuring that there is an "= void;" affixed to each decl? If you're all 
 happy with that, we can eliminate those issues with Win32 bloat without 
 a fix from Walter. Woohoo!
 
 All those in favour please say 'aye'. All those not in favour say 'nae'.
 
 Those in favour of a true fix say nothing at all -- that way, we can 
 truthfully assert most ppl want a real fix instead ;)
 
 (see related posts also)
I must be late to the party, or mislaid my invitation. Is this attempting to solve the link size of executables? If so, and this changes nothing but the level of bloat we've all come to expect, then "AYE". As long as it can't be misinterpreted by other (potential) compilers, and is side-effect free code then there's no reason not to do this. -- - EricAnderton at yahoo
Jan 23 2007
parent reply kris <foo bar.com> writes:
Pragma wrote:
 kris wrote:
 
 W00t! Poll Time!

 All you Win32 developers out there -- how do you feel about marking 
 all instances of Win32 structs like so:

 POINT p = void;
 ...
 ...
 ...
 TV_ITEM tv = void;
 ...
 TEXTMETRIC tm = void;

 ensuring that there is an "= void;" affixed to each decl? If you're 
 all happy with that, we can eliminate those issues with Win32 bloat 
 without a fix from Walter. Woohoo!

 All those in favour please say 'aye'. All those not in favour say 'nae'.

 Those in favour of a true fix say nothing at all -- that way, we can 
 truthfully assert most ppl want a real fix instead ;)

 (see related posts also)
I must be late to the party, or mislaid my invitation. Is this attempting to solve the link size of executables? If so, and this changes nothing but the level of bloat we've all come to expect, then "AYE". As long as it can't be misinterpreted by other (potential) compilers, and is side-effect free code then there's no reason not to do this.
It's all legal D, and kosher for C-based code. The downside is that when you miss out certain " = void;" (for specific Win32 structs) you'll get a ungrokable linker error. See Sean's recent post on "Big problem with Small programs" for the true culprit.
Jan 23 2007
parent John Reimer <terminal.node gmail.com> writes:
On Tue, 23 Jan 2007 13:47:28 -0800, kris wrote:


 
 It's all legal D, and kosher for C-based code. The downside is that when 
 you miss out certain " = void;" (for specific Win32 structs) you'll get 
 a ungrokable linker error.
 
 See Sean's recent post on "Big problem with Small programs" for the true 
 culprit.
Aye... I forgot about that D feature... and it's even documented. It's a perfect workaround for this situation (and you've verified it works, I assume). You must have distracted me by titling you posts with all those annoyingly catchy quotes and references. :D -JJR
Jan 23 2007