Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Oct 1999 17:07:50 -0600
From:      Wes Peters <wes@softweyr.com>
To:        Chuck Robey <chuckr@picnic.mat.net>
Cc:        tbuswell@acadia.net, Thomas David Rivers <rivers@dignus.com>, freebsd-hackers@FreeBSD.ORG
Subject:   Re: X11/C++ question
Message-ID:  <381785C6.C0000EF1@softweyr.com>
References:  <Pine.BSF.4.10.9910262253040.29073-100000@picnic.mat.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Chuck Robey wrote:
> 
> On Tue, 26 Oct 1999 tbuswell@acadia.net wrote:
> 
> >
> > Thomas David Rivers writes:
> >  >  If you mean Xt (and possibly Motif) - the answer is "very carefully."
> > [...]
> >
> > You're approach would probably work, but there's an easier way.
> > See topic 28 in the Xt FAQ.
> >
> > ftp://ftp.x.org/contrib/faqs/FAQ-Xt
> >
> > It's not name mangling causing problems, it's lack of "this" when the
> > method is invoked as a callback from Xt.
> 
> Yes!  This is the method!  I like it, or at least, it's as close (in C++
> code) to something I do like.

I assume they're using a static member function for the callback and storing
the this pointer for the object somewhere handy?  This is the canonical way
to re-enter C++ code from C land, and can even be used for C++ interrupt
handlers if you're very careful.

-- 
            "Where am I, and what am I doing in this handbasket?"

Wes Peters                                                         Softweyr LLC
wes@softweyr.com                                           http://softweyr.com/


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?381785C6.C0000EF1>