[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [platform-swt-dev] GTK in CVS
|
Steve_Northover@xxxxxxx writes:
> Can't just change things to long and cast because int's also need to wrap
> and overflow and match exactly what is going on in the OS.
I don't understand that really - why would you wrap or overflow a
pointer? If you do this in C:
GtkWidget *w;
long i;
w = gtk_button_new ();
i = (long) w;
i += 57;
w = (GtkWidget*) i;
Then you have worse problems than possible overflow. ;-) i.e. these
values should never be modified, except for assignment. Arithmetic ops
are right out.
> As you know, it's always fastest to use the machine word size which
> is 32-bit on most machines today. It'd be 2 pushes instead of one.
I'm sure there's a performance difference here, but I'd be surprised
if it's enough to matter. I could be wrong.
In any case, "too slow" can't really outweigh "does not work," in my
mind.
It probably makes sense to ignore the issue until GTK 2 and java-gnome
are sorted out, and maybe until someone is actually trying an IA-64
port, since the "int" stuff is all buried underneath SWT rather than
in the API anyhow.
Havoc