Re: u/int64 support for glib status?
- From: Tim Janik <timj gtk org>
- To: Erik Walthinsen <omega temple-baptist com>
- Cc: Owen Taylor <otaylor redhat com>, vishnu pobox com, Gtk+ Developers <gtk-devel-list gnome org>
- Subject: Re: u/int64 support for glib status?
- Date: Thu, 20 Sep 2001 00:26:57 +0200 (CEST)
On Wed, 19 Sep 2001, Erik Walthinsen wrote:
> On Thu, 20 Sep 2001, Tim Janik wrote:
>
> > 1) what should the name be? G_TYPE_INT64 might be a bad choice, what's
> > going to happen for the first 128bit cpu? does it come with long long long,
> > or will the compiler people simply resize long long integer to 128bit?
> > so i'd lean towards something like G_TYPE_BIGUINT and guarantee that
> > it's >= 64bit. though the name is a bit silly ;)
>
> The whole int/long/longlong naming scheme doesn't make much sense to me,
> because a) it doesn't scale, and b) it doesn't mean anything except the
> machine register size, generally. That said, it does have relevance. How
> about we stick with either the int/longlong scheme or the uint32/uint64
> scheme, and #define one to the other? That way users who don't care just
> use int and get register-side values, and those who do can specify the
> size they need. Not sure which set would be the 'real' set, but I'd lean
> towards the dumb/nonscalable names (<g>) because they're what already
> exist, and have the most relation to the idea that int/long are
> register-sized quantities. Then if int64 has to be conditional, it's just
> a matter of some #defines in a #ifdef or two (roughly, I haven't looked at
> the patch too carefully yet).
the thing is that we'll have to maintain these types into eternity.
we'll already have a major problem if a compiler one day wants to get
rid of any of 8bit, 16bit or 32bit integer types. though i'd consider
that a ridiculous undertaking and consider such a compiler (even if beefed
up for some 256bit machine) a failure right from the start.
i can't make that assumption for long / 64bit though, as "long" is already
differently sized on various compilers/platforms, and "long long" meaning
64bit is somewhat non-standard still. so in any case, we'll just have a
SOMETHINGINT that'll be >=64bit, not ==64bit, and once we're there, we'd
better not call it "64"something, but name it in a way that indicates
it's just bigger than 64bit.
>
> Just a thought, dunno how sane or not.
>
---
ciaoTJ
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]