From: Bibek Sahu <scorpio@dodds.net>
To: axp-list@redhat.com
Cc: Shaw Terwilliger <sterwill@postman.abisource.com>
Subject: Re: C++ gurus; AbiWord pointer casting on Alpha
Date: Thu, 19 Nov 1998 17:02:06 -0600 (CST) [thread overview]
Message-ID: <Pine.LNX.3.95.981119170024.4605A-100000@norad.dodds.net> (raw)
In-Reply-To: <Pine.LNX.3.95.981119162109.31728P-200000@norad.dodds.net>
I spoke too soon. It allows menus to be displayed, but activating
a menu item still causes a segfault. However, that is a different (though
related) problem.
- Bibek
On Thu, 19 Nov 1998, Bibek Sahu wrote:
>
> Ok, scratch that, I was wrong: there is no 'callback_data' member.
>
> I looked at the Gimp source to see how it was done there (since it
> does work fine on my machine), and discovered that AbiWord was being done
> in a fundamentally incorrect manner.
>
> Gotta love that GTK documentation, huh? I had to dig through the
> gtk headers and another program's source code to figure this out... THAT I
> consider to be fundamentally Wrong. ;-)
>
> At any rate, since the menuing code was already using the
> UT_Vectors, the fix was trivial. A patch is attached. Menus work for me
> now; hurray! :-)
>
> However, it still does segfault on exit. I'll look into that
> later.
>
> - Bibek
>
> On Mon, 16 Nov 1998, Shaw Terwilliger wrote:
>
> > Bibek Sahu wrote:
> > > 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.
> >
> > Hm... I'm still wondering if it's a compiler thing (testgtk is C,
> > we're using C++; odd chance that the C++ compiler is doing much
> > different
> > casting here). If we're abusing that member (storing pointers instead
> > of, say, an index to a list of functions), the GTK guys sure haven't
> > told me so. I asked on the list early this morning, and on the IRC
> > channel. None of them seem to really know; the total lack of
> > documentation
> > on GTK+ doesn't help much. :)
> >
> > I'll take a look at this some more and try to get back to the Alpha
> > list about it.
> >
> > --
> > Shaw Terwilliger
> >
>
next prev parent reply other threads:[~1998-11-19 23:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <3650D107.CDA25BE0@postman.abisource.com>
1998-11-19 22:26 ` C++ gurus; AbiWord pointer casting on Alpha Bibek Sahu
1998-11-19 23:02 ` Bibek Sahu [this message]
1998-11-16 10:44 Shaw Terwilliger
1998-11-17 0:56 ` Bibek Sahu
1998-11-17 1:12 ` Paul Tomblin
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