From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57578) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dO5Vp-0005gA-5T for qemu-devel@nongnu.org; Thu, 22 Jun 2017 13:03:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dO5Vk-0001MT-Qd for qemu-devel@nongnu.org; Thu, 22 Jun 2017 13:03:21 -0400 From: Juan Quintela In-Reply-To: <20170622184255.2d44e3bd@bahia.lab.toulouse-stg.fr.ibm.com> (Greg Kurz's message of "Thu, 22 Jun 2017 18:42:55 +0200") References: <149814756006.27338.8723356702388175951.stgit@bahia> <20170622184255.2d44e3bd@bahia.lab.toulouse-stg.fr.ibm.com> Reply-To: quintela@redhat.com Date: Thu, 22 Jun 2017 19:03:13 +0200 Message-ID: <87injo6jla.fsf@secure.mitica> MIME-Version: 1.0 Content-Type: text/plain 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: Greg Kurz Cc: Peter Maydell , QEMU Developers , QEMU Trivial , "Dr. David Alan Gilbert" Greg Kurz wrote: > On Thu, 22 Jun 2017 17:14:08 +0100 > Peter Maydell wrote: > >> On 22 June 2017 at 17:06, Greg Kurz wrote: >> > Function types cannot reside in the same sorted list as opaque types since >> > they may depend on a type which would be defined later. >> > >> > Of course, the same problem could arise if a function type depends on >> > another function type with greater alphabetical order. Hopefully we >> > don't have that at this time. >> >> The other approach would be to put function types somewhere >> else and leave typedefs.h for the simple 'opaque types >> for structures' that it was started as. >> >> For instance we have include/qemu/fprintf-fn.h as a precedent. >> > > Indeed, and I'm not quite sure why Juan decided to put these types into > typedefs.h instead of a dedicated header file in include/migration... is > it only because it was the quickest fix ? All other typedefs were defined there. I can create a different include file, but I think that is "overengineering", no? They are typedefs, just not of structs. But I agree that they are the only ones. Later, Juan.