Re: [gtk-list] Re: ItemFactory anyone?
- From: Todd Dukes <tdukes ibmoto com>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Re: ItemFactory anyone?
- Date: Thu, 14 Jan 1999 12:50:44 -0600
Jan Kratochvil wrote:
>
> > Jan Kratochvil wrote:
> > > > If you already know what the menu items are going to be and they won't
> > > > change at runtime you can just use a case statement in your callback.
> > >
> > > Oh my god, why just don't cast the needed pointer (it WILL be probably pointer),
> > > to "guint"? Like in the following example:
> >
> > Oh my god, why don't you just go break your code on the Alpha then? :)
> > You'll get a friendly little "segmentation fault" when you assign a
> > 64-bit
> > pointer to a 32-bit guint.
> >
> > Shaw Terwilliger
>
> At first I should say that I'm in no way an Alpha expert or multi-platform geek
> (only x86 unfortunately, only some shared access to Linux/Sparc). But:
>
> a) I expect that guint/gint maps to "unsigned int"/"int" on all platforms.
> b) I somewhere heard that GCC relies on the fact that (void *) fits in an "int"
> datatype anyway.
> c) Alpha really should have int/gint 64-bits wide. It's pure 64-bit CPU/system
> so why it would mess with anything smaller?
>
> But I agree that it maybe isn't the strict all-world portable solution. But
> on all normally used machines does this cast causes any problems? I don't know
> about any platfowm but read my first sentence. :-)
>
> Lace
>
> --
> To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null
Why not have the callback data, which is common to all entries, point to
an array of pointers. Use the integer to index into the array of
pointers?
Todd.
--
==============================================================
| Todd Dukes E-MAIL: tdukes@ibmoto.com |
| Motorola Somerset Phone: (512) 424-8008 |
| MS OE70 |
| 6300 Bridgepoint Parkway Building #3 |
| Austin, Texas 78730 |
==============================================================
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]