khtml crashes on win32/msvc

Germain Garand germain at ebooksfrance.org
Sat Mar 3 22:46:52 GMT 2007


Le Vendredi 02 Mars 2007 20:42, Christian Ehrlicher a écrit :
> David Faure schrieb:
> > On Wednesday 28 February 2007, Christian Ehrlicher wrote:
> >> msdn clearly says, that an enum is int or int64 :(
> >
> > Another solution, then, is to never use the most significant bit, right?
>
> Ok, I now tried to extend the two problematic structs , but now I need
> more than 64 bits for RenderStyle::NonInheritedFlags -> it breaks the
> operator== for the highest two bits
>
> But at least kopete does not crash in khtml anymore... :)
>
> Any ideas?

couldn't you conditionally replace the enum types wherever it matters?

e.g.
#ifdef SIGNED_BF_ENUMS
  #define BF_ENUM(a) unsigned int
  #define CAST_BF_ENUM(a,b) static_cast<a>(b)
#else
  #define BF_ENUM(a) a
  #define CAST_BF_ENUM(a,b) b
#endif


and then

BF_ENUM(EListStyleType) _list_style_type : 6;
...
EListStyleType listStyleType() const { 
  return CAST_BF_ENUM(EListStyleType, inherited_flags.f._list_style_type);
}





More information about the kfm-devel mailing list