Re: portability question
- From: Sheldon Simms <wsxyz6294 yahoo com>
- To: gtk-devel-list gnome org
- Subject: Re: portability question
- Date: Tue, 16 Dec 2003 14:22:21 -0800 (PST)
> You'll find that uintptr_t is vastly less portable than
> what we are doing now. It's a C99'ism...
No it isn't and that doesn't matter. It is easy to check
for uintptr_t during configure and supply it if it doesn't
exist.
> Part of the GLib porting process is making sure that the
> size of the GType integral type is the same as the size of
> a pointer. Luckily for the ease of the porting process,
> all common platforms have long and pointers with the
> same size.
>
> We're playing a bunch of "non-portable" tricks with GType
> because the speed and compactness of GType is really important.
>
> Note that we're assuming as well:
>
> - No pointers are found in the first 1024 bytes of memory
> - Pointers to TypeNode structures are aligned on 4-byte
> boundaries.
Yes I did notice.
In any case, my curiosity is satisfied regarding this matter.
I'm new to GTK+ and it's just that I was somewhat surprised to
see this kind of code. I'll get over it and keep reading.
I should mention that I am generally impressed by the code I've
read so far (which is all in glib/gobject). I find it quite easy
to follow, although since I'm still on my first pass through the
code I don't really have the big picture yet, and therefore have
to guess how some things work based on their names.
-Sheldon
__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]