Re: Moving to pointer-sized GType?

On Fri, 14 Sep 2001, George wrote:

> On Fri, Sep 14, 2001 at 12:08:48PM -0400, Alex Larsson wrote:
> > These can all be found by eliminating all appearances of guint in the 
> > output of 'find -name "*.c" | xargs grep -C2 _get_type', and we have done 
> > so for Gtk+, Gimp and gnome-libs. But the possiblility exists that some 
> > code stores GtkTypes in 32bit integers in some other fashion.
> > 
> > Doing this change will almost certainly cause some apps to segfault on 
> > 64bit while working on 32bit until all our apps are fixed. 
> > 
> > We (the Gtk+ team) are interested in the opinion of developers (especially 
> > on 64bit systems) on this change. Do you think it is worth it? Do you know of any 
> > code that stores GtkTypes in uints currently?
> I think this is a very good change for a number of other reasons.  For one it
> makes the alignment on the object structure implicitly pointersized, which
> avoids some other warnings on alpha (though I think none of them are bad, but
> could be).  Also just getting and using 64bit values should be faster then
> 32bit gets anyway.  So I think this is definately a step in the right
> direction.
> (also note that since on alpha the alignment of an object structure is on
>  64bit boundaries since it contains pointers, this doesn't increase size
>  of structures neither on i386 nor on alpha)

The actual GType value is stored in the class structure, so no object 
structures are actually changed, but i see your point.

/ Alex

gnome-hackers mailing list
gnome-hackers gnome org

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]