From owner-freebsd-hackers Wed Oct 27 16: 9:45 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from xylan.com (postal.xylan.com [208.8.0.248]) by hub.freebsd.org (Postfix) with ESMTP id 255DA14E08 for ; Wed, 27 Oct 1999 16:09:43 -0700 (PDT) (envelope-from wes@softweyr.com) Received: from mailhub.xylan.com by xylan.com (8.8.7/SMI-SVR4 (ind.alcatel.com 2.3 [OUT])) id QAA16358; Wed, 27 Oct 1999 16:07:53 -0700 (PDT) Received: from omni.xylan.com by mailhub.xylan.com (SMI-8.6/SMI-SVR4 (mailhub 2.1 [HUB])) id QAA21472; Wed, 27 Oct 1999 16:07:53 -0700 Received: from softweyr.com (dyn7.utah.xylan.com) by omni.xylan.com (4.1/SMI-4.1 (xylan engr [SPOOL])) id AA23915; Wed, 27 Oct 99 16:07:42 PDT Message-Id: <381785C6.C0000EF1@softweyr.com> Date: Wed, 27 Oct 1999 17:07:50 -0600 From: Wes Peters Organization: Softweyr LLC X-Mailer: Mozilla 4.7 [en] (X11; U; FreeBSD 3.1-RELEASE i386) X-Accept-Language: en Mime-Version: 1.0 To: Chuck Robey Cc: tbuswell@acadia.net, Thomas David Rivers , freebsd-hackers@FreeBSD.ORG Subject: Re: X11/C++ question References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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