on the use of char
Richard Dale
Richard_Dale at tipitina.demon.co.uk
Thu Jul 29 16:03:07 BST 2004
On Thursday 29 July 2004 14:58, Frans Englich wrote:
> On Thursday 29 July 2004 02:04, George Staikos wrote:
> > Hi folks,
> >
> > I'd like to point out that we need to be careful about the use of
> > "char" for storing numbers in KDE. Some platforms have unsigned char
> > type, others have signed char type. I happen to have both. Consequently
> > I have seen, on a regular basis, broken KDE applications on one or both
> > of my machines due to code that assumes signedness or unsignedness of
> > char. Yes, I have also implemented this bug before.
What's the correct thing to do when sending chars over DCOP?
I send out a char like this:
*stream << (Q_INT8) stack[i].s_char;
And receive a char like this:
Q_INT8 temp;
*stream >> temp;
So should these Q_INT8 types be just 'char' instead, as they can be unsigned
or signed on different platforms?
-- Richard
More information about the kde-core-devel
mailing list