Re: Code changes for glib to enhance 64-bit operation
- From: "Mark Murnane" <Mark Murnane ireland sun com>
- To: "Pavel Machek" <pavel suse cz>, "Mark Murnane" <Mark Murnane Sun COM>, <gtk-devel-list gnome org>
- Cc: <Michael Myburgh Sun COM>
- Subject: Re: Code changes for glib to enhance 64-bit operation
- Date: Wed, 25 Apr 2001 21:00:40 +0100
Pavel,
Sorry for the delay. I'm afriad my mailbox got a bit swamped so I lost
track of this one.
Obviously I forgot to change something, but I will need to revisit
testglib.c anyway.
As you pointed out, errors occur during casting. This showed up
particularly in
testing of garrays. The cast from an int to a long led to data loss when
inserting
elements. This in turn caused the array tests to fail.
I'll go over this code again and submit a new diff for testglib.
Thanks,
Mark
-----------------------------------------------
Mark Murnane
Desktop, Applications and Middleware Group
Sun Microsystems Ireland
-----------------------------------------------
----- Original Message -----
From: "Pavel Machek" <pavel suse cz>
To: "Mark Murnane" <Mark Murnane Sun COM>; <gtk-devel-list gnome org>
Cc: <Michael Myburgh Sun COM>
Sent: Thursday, April 19, 2001 11:52 PM
Subject: Re: Code changes for glib to enhance 64-bit operation
> Hi!
>
> > Index: testglib.c
> > ===================================================================
> > RCS file: /cvs/gnome/glib/testglib.c,v
> > retrieving revision 1.49
> > diff -u -r1.49 testglib.c
> > --- testglib.c 2001/03/09 21:31:21 1.49
> > +++ testglib.c 2001/04/18 18:06:22
> > @@ -46,7 +46,7 @@
> > #include <io.h> /* For read(), write() etc */
> > #endif
> >
> > -static int array[10000];
> > +static int array[10000]; /* 64-bit change: int -> long */
>
> Ugh?
>
> >
> > -static guint
> > +static gulong /* 64-bit change: guint -> gulong */
>
> I believe this comment is evil. Fix it, but do not put comment there.
>
> Pavel
> What are you fixing btw?
>
> > my_hash (gconstpointer key)
> > {
> > - return (guint) *((const gint*) key);
> > + return (gulong) *((const gint*) key); /* 64-bit change:
guint->gulong */
> ~~~~~~~~~~~~~
> will not this spoil it?
>
>
> --
> I'm pavel ucw cz "In my country we have almost anarchy and I don't care."
> Panos Katsaloulis describing me w.r.t. patents at discuss linmodems org
>
> _______________________________________________
> gtk-devel-list mailing list
> gtk-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-devel-list
>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]