From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51047) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dO6wd-00015P-Od for qemu-devel@nongnu.org; Thu, 22 Jun 2017 14:35:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dO6wZ-00019T-Ph for qemu-devel@nongnu.org; Thu, 22 Jun 2017 14:35:07 -0400 Date: Thu, 22 Jun 2017 19:34:58 +0100 From: "Dr. David Alan Gilbert" Message-ID: <20170622183457.GG2100@work-vm> References: <149814756006.27338.8723356702388175951.stgit@bahia> <20170622184255.2d44e3bd@bahia.lab.toulouse-stg.fr.ibm.com> <87injo6jla.fsf@secure.mitica> <20170622172555.GE2100@work-vm> <20170622194649.6d251753@bahia.lab.toulouse-stg.fr.ibm.com> <20170622175012.GF2100@work-vm> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH] Separate function types from opaque types in include/qemu/typedefs.h List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Thomas Huth , Greg Kurz , QEMU Trivial , QEMU Developers , Juan Quintela * Peter Maydell (peter.maydell@linaro.org) wrote: > On 22 June 2017 at 19:08, Thomas Huth wrote: > > On 22.06.2017 19:50, Dr. David Alan Gilbert wrote: > >> Could do; I'm just not finding tiny header files with one or > >> two entries each that useful. > > Well, it means that the bulk of code that doesn't care about the > types doesn't get its compilation fractionally slowed by having > to parse the typedef anyway. In general I think we're drifting > towards "have each .c file get fewer things automatically" rather > than otherwise (eg more finely focused files rather than stuffing > everything into qemu-common.h). At the cost of things getting fractionally slower by including lots more tiny headers. I generally agree in the case where there's a useful chunk, but when it's down to one or two definitions I don't see the point. > > Do we really need these function typedefs at all? IMHO it's quite ugly > > to hide such things in a typedef unless it is really necessary (and in > > this case, it does not seem to be really necessary since it is only used > > in a few places). So what about simply removing the typedefs in this case? > > I find function typedefs much more readable than having the > function-types inline in function arguments and the like. > > This is all fairly rapidly heading into bikeshed territory > though -- in the final analysis I don't think it matters > much what we do. Agreed. Dave > thanks > -- PMM -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK