From: Bibek Sahu <scorpio@dodds.net>
To: axp-list@redhat.com
Cc: sterwill@abisource.com
Subject: Re: C++ gurus; AbiWord pointer casting on Alpha
Date: Mon, 16 Nov 1998 18:56:55 -0600 (CST) [thread overview]
Message-ID: <Pine.LNX.3.95.981116185150.3945C-100000@norad.dodds.net> (raw)
In-Reply-To: <19981116104412.A29060@dogbert.io.nu>
On a whim, I decided to test this. I compiled and ran the
'testgtk' program that came with gtk+, testing specifically those parts of
it that used 'callback_action'. It worked flawlessly.
Although I don't know the code well enough to be positive, it
appears that 'callback_action' is supposed to be data rather than a
function pointer. The 'callback_data' member, defined to be of type
gpointer, which is in all the structures that include callback_action
might be more appropriate if you need a pointer.
- Bob
On Mon, 16 Nov 1998, Shaw Terwilliger wrote:
> On Sun, Nov 15, 1998 at 10:50:20PM -0500, Michael J. Donahue wrote:
> > >> _wd * wd = (_wd *)m_menuFactoryItems[k].callback_action;
> > Ulrich's question is the first thing to check. Anyone with experience
> > porting 32-bit apps to the Alpha knows that pointer casts are red flags.
>
> Without even trying the compiler test, I can assure you it's our
> casting problem. :) Unfortunately, it's deeper than our code, it's
> GTK+. The callback_action member is a "guint", which should be defined
> to be sizeof(unsigned int) on your platform. This works on Intels, breaks on
> Alphas (and any other platform where sizeof(unsigned int) !=
> sizeof(unsigned int *)).
>
> So, now it's time to find out why the GTK+ guys are using guints as
> pointer substitutes. I really feel bad for not digging into the code
> as soon as Brian put out this message, but I'll soon get to deal with
> the Alpha issues every day, thanks to him. :)
>
> --
> Shaw Terwilliger (twig@advancenet.net sterwill@abisource.com)
>
> --
> To unsubscribe: send e-mail to axp-list-request@redhat.com with
> 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
>
next prev parent reply other threads:[~1998-11-17 0:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-11-16 10:44 C++ gurus; AbiWord pointer casting on Alpha Shaw Terwilliger
1998-11-17 0:56 ` Bibek Sahu [this message]
1998-11-17 1:12 ` Paul Tomblin
[not found] <3650D107.CDA25BE0@postman.abisource.com>
1998-11-19 22:26 ` Bibek Sahu
1998-11-19 23:02 ` Bibek Sahu
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox