From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 22365 invoked from network); 17 Nov 1998 01:12:37 -0000 Received: from mail.redhat.com (199.183.24.239) by mail2.redhat.com with SMTP; 17 Nov 1998 01:12:37 -0000 Received: from xcski.com (d185d1c51.rochester.rr.com [24.93.28.81]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id UAA26627 for ; Mon, 16 Nov 1998 20:12:36 -0500 Received: (from ptomblin@localhost) by xcski.com (8.8.7/8.8.7) id UAA22607; Mon, 16 Nov 1998 20:12:39 -0500 Message-ID: <19981116201239.B22040@xcski.com> Date: Mon, 16 Nov 1998 20:12:39 -0500 From: Paul Tomblin To: axp-list@redhat.com Subject: Re: C++ gurus; AbiWord pointer casting on Alpha References: <19981116104412.A29060@dogbert.io.nu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.91.1 In-Reply-To: ; from Bibek Sahu on Mon, Nov 16, 1998 at 06:56:55PM -0600 Quoting Bibek Sahu (scorpio@dodds.net): > 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. I've never done any gtk programming, but one of the weirdnesses you get used to in Xt and Motif programming is the XtCallback structure. Callbacks are called with three arguments, the last two are of type XtPointer, which is usually typedefed as void*. But they are often used, both in the Xt libraries itself and in user code, to pass integers instead of pointers. -- "Linux's homebase is currently commodity network and server infrastructure. By folding extended functionality ... into today's commodity services, we raise the bar & change the rules of the game." - Microsoft leaks their strategy for monopolizing the Internet and the desktop.