[prev in list] [next in list] [prev in thread] [next in thread]
List: kmail-devel
Subject: Re: Huston, we have a problem: Q_UINT32 vs. unsigned long
From: Don Sanders <sanders () kde ! org>
Date: 2004-06-24 9:33:04
Message-ID: 200406241933.07228.sanders () kde ! org
[Download RAW message or body]
On Wednesday 23 June 2004 18:50, Bo Thorsen wrote:
> On Wednesday 23 June 2004 01:00, Ingo Klöcker wrote:
> > On Tuesday 22 June 2004 10:07, Bo Thorsen wrote:
> > > On Tuesday 22 June 2004 10:04, David Faure wrote:
> > > > On Tuesday 22 June 2004 09:01, Bo Thorsen wrote:
> > > > > It's of course tempting to take advantage of the bigger
> > > > > capability of a 64 bit system, but AFAIK the number stored
> > > > > in the index file is always 32 bit, so that's not possible.
> > > >
> > > > Which is why there might be no bug at all here. As long as
> > > > the serial numbers are initially created as int32s, it
> > > > doesn't matter which (possibly bigger) int type you put them
> > > > in later on.
> > >
> > > Well, they are saved back at some point. Of course, as long as
> > > the serial number doesn't actually use the upper 32 bits then
> > > this doesn't go wrong. Which means if someone decides to change
> > > the way the serial numbers are done, then it will break.
> >
> > So it should be fixed eventually but it's not very urgent.
>
> Yes. Could be a nice little janitor job, perhaps?
Will a janitor know to do something like create a SerialNumber class
declared in kmmsgdict.h and implemented in kmmsgdict.cpp that wraps a
QUINT_32, only provides an explicit 'Q_UINT32 toUint()' method, and
then replace all the 'unsigned long's in kmmsgdict.h with
SerialNumber's, and fix the resulting series of cascading compilation
errors?
I think it would be a shame (and error prone) if someone manually
searched all the code for unsigned int's that should be converted to
Q_UINT32's, instead of leveraging the compilers type checking
functionality.
I mean even if the SerialNumber class is considered overkill it would
be safe/fast to use it as an intermediate working class and then
seach/replace SerialNumber with Q_UINT32 (and removing the toUint
calls) before checking code in.
Don.
_______________________________________________
KMail developers mailing list
KMail-devel@kde.org
https://mail.kde.org/mailman/listinfo/kmail-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic