From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25292 invoked by alias); 1 Sep 2010 18:30:10 -0000 Received: (qmail 25283 invoked by uid 22791); 1 Sep 2010 18:30:10 -0000 X-SWARE-Spam-Status: No, hits=-6.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 01 Sep 2010 18:30:04 +0000 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o81ITlPk010325 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 1 Sep 2010 14:29:47 -0400 Received: from host1.dyn.jankratochvil.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o81ITja9031931 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 1 Sep 2010 14:29:46 -0400 Received: from host1.dyn.jankratochvil.net (localhost [127.0.0.1]) by host1.dyn.jankratochvil.net (8.14.4/8.14.4) with ESMTP id o81ITiAp024066; Wed, 1 Sep 2010 20:29:44 +0200 Received: (from jkratoch@localhost) by host1.dyn.jankratochvil.net (8.14.4/8.14.4/Submit) id o81ITi0g024061; Wed, 1 Sep 2010 20:29:44 +0200 Date: Wed, 01 Sep 2010 18:30:00 -0000 From: Jan Kratochvil To: Joel Brobecker Cc: Eli Zaretskii , Mark Kettenis , gdb-patches@sourceware.org Subject: Re: [patch 1/9]#2 Rename `enum target_signal' to target_signal_t Message-ID: <20100901182943.GA23673@host1.dyn.jankratochvil.net> References: <20100830140814.GE2986@adacore.com> <20100831182829.GA16136@host1.dyn.jankratochvil.net> <20100901181830.GB2986@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100901181830.GB2986@adacore.com> User-Agent: Mutt/1.5.20 (2009-12-10) 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: 2010-09/txt/msg00037.txt.bz2 On Wed, 01 Sep 2010 20:18:30 +0200, Joel Brobecker wrote: > > I would prefer gdb_target_signal_t or also gdb_target_signal. > > > > Is one of those approved? > > I've just realize that this specific patch really only renames > the type, in addition to adding a typedef. > > I'm just wondering why this is actually useful to you. I would have > thought that we could avoid this patch entirely, and then let the > next patch which introduces the gdb_target_signal as a struct just > update all uses of the enum type. Once the struct has been introduced, > we could do a rename if we feel that a better name of the enum can > be found - I think that doing the rename would produce a patch > that is smaller if done after introducing the struct wrapper first. I found target_signal_t to be more convenient than `struct target_signal'. Some coding styles never use the `struct' types and always use typedef for any struct defined (more matching C++). target_signal operations are mostly fully encapsulated in the patch so it does not have to be clear to its user it is in fact a dereferencable struct. Another point I was tracking with these changes is to make the patching easier=automatic. I can do s/\benum target_signal\b/target_signal_t/g and be done with it as strlen rhs is smaller than strlen of lhs. `struct target_signal' is longer and thus causing line wrapping requiring many adjustments of GNU coding style 78 columns compliance by hand. (This reindentation affects also the typedef name `gdb_target_signal_t' although it would not affect `gdb_target_signal'. Still there would be less reindentation cases than in the `struct gdb_target_signal' case.) These were the reasons for the typedef but I do not mind and I can monkey-patch whatever gets agreed upon and be done with this part which accidentally became a code cleanup only patch. Thanks, Jan