From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13002 invoked by alias); 28 Jan 2007 08:35:11 -0000 Received: (qmail 12990 invoked by uid 22791); 28 Jan 2007 08:35:10 -0000 X-Spam-Check-By: sourceware.org Received: from viper.snap.net.nz (HELO viper.snap.net.nz) (202.37.101.8) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 28 Jan 2007 08:35:05 +0000 Received: from kahikatea.snap.net.nz (164.61.255.123.dynamic.snap.net.nz [123.255.61.164]) by viper.snap.net.nz (Postfix) with ESMTP id 3B1923D815F; Sun, 28 Jan 2007 21:35:02 +1300 (NZDT) Received: by kahikatea.snap.net.nz (Postfix, from userid 500) id 2D7E54F71C; Sun, 28 Jan 2007 21:34:59 +1300 (NZDT) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17852.24626.705301.541755@kahikatea.snap.net.nz> Date: Sun, 28 Jan 2007 08:35:00 -0000 To: Vladimir Prus Cc: Daniel Jacobowitz , gdb-patches@sources.redhat.com Subject: Re: -var-info-path-expression In-Reply-To: <200701281056.31488.ghost@cs.msu.su> References: <200612251200.42622.ghost@cs.msu.su> <200701280048.37153.ghost@cs.msu.su> <17851.62039.333484.886195@kahikatea.snap.net.nz> <200701281056.31488.ghost@cs.msu.su> X-Mailer: VM 7.19 under Emacs 22.0.93.2 X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-01/txt/msg00565.txt.bz2 > > and propagate these changes back to struct language_specific so we have: > > > > static char * > > name_of_child (struct varobj *var, int index) > > { > > return (char *) (*var->root->lang->describe_child) (CHILD_NAME, var, index); > > And have casts from void* to the right type? I'm not sure that's any > advantage. Maybe using making a cast is as sinful as using a goto statement, I wouldn't know, but I would call having four times fewer functions an advantage. Perhaps it would be better to use a macro e.g #define name_of_child(var, index) \ (char *) (*var->root->lang->describe_child) (CHILD_NAME, var, index) -- Nick http://www.inet.net.nz/~nickrob