On Tuesday,  7 November 2006 at 12:41, Dennis Schridde wrote:
> Am Dienstag, 7. November 2006 00:22 schrieb Gerard Krol:
> > Watch out for the:
> >
> >  #ifndef WZ_OS_WIN
> >
> > I guess it's better to have the same data types on all platforms. (On MinGW
> > BOOL is defined as int) And as memory usage is not really an issue, why not
> > leave BOOL == int? We just need to make sure it is saved to disk
> > consistently, and int is the native (fast) data type.
> That wasn't the point I was concerned about...
> The interesting thing is _why_ does it break with BOOL not being int?
> Means: _Who_ is relying on BOOL, which logically could be 1bit, to be 32bit 
> long? Why does this make WZ segfault? ...
> So the issue stays the same.
> I guess somewhere WZ wants to store a pointer into a BOOL or assign 
> something != TRUE/FALSE to it. And eg on a 64bit Platform I think 
> sizeof(int)!=sizeof(void*)...
> So this is a problem anyway, in case the reason it crashes is that it stores 
> a 
> pointer into a BOOL.
> If it stores something != TRUE/FALSE into a BOOL, it's just ugly and should 
> be 
> fixed, too, for every platform and compiler.

Do a "#define bool BOOL" and use g++ to show you where BOOL is used
in... interesting ways? Hm, sounds like fun, I might do that later
myself...

-- 
<Thoth_> Yeah, well that's why it's numbered 2.3.1... it's for those of us
         who miss NT-like uptimes

_______________________________________________
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev

Reply via email to