From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39566) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WnqXf-0008Mb-E9 for qemu-devel@nongnu.org; Fri, 23 May 2014 10:33:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WnqXZ-0004ox-P4 for qemu-devel@nongnu.org; Fri, 23 May 2014 10:33:51 -0400 Received: from mail-ee0-x234.google.com ([2a00:1450:4013:c00::234]:33567) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WnqXZ-0004op-IW for qemu-devel@nongnu.org; Fri, 23 May 2014 10:33:45 -0400 Received: by mail-ee0-f52.google.com with SMTP id e53so3613897eek.25 for ; Fri, 23 May 2014 07:33:44 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <537F5C44.7060002@redhat.com> Date: Fri, 23 May 2014 16:33:40 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1399650964-21067-1-git-send-email-peter.maydell@linaro.org> <537F2FCF.4060406@suse.de> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH v2 0/4] Allow QOM struct fields to be marked as private List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell , =?UTF-8?B?QW5kcmVhcyBGw6RyYg==?= =?UTF-8?B?ZXI=?= Cc: QEMU Developers , Anthony Liguori , Patch Tracking Il 23/05/2014 13:50, Peter Maydell ha scritto: > On 23 May 2014 12:23, Andreas Färber wrote: >> Am 23.05.2014 13:13, schrieb Peter Maydell: >>> Ping? >> >> I believe I remarked that in the example >> typedef struct Foo { >> would be more in line with our Coding Style and majority of users. >> >> Other than that, I have no objections and assumed you'll take it through >> your arm queue. > > Oops, yes, I'd forgotten that conversation. I'll remove > the newline preceding the '{' and am happy to put this > through the target-arm queue. Semi-serious proposal: #define comma_if_empty_ , #define CPP_IFEMPTY(macro, t, f) CPP_IFEMPTY1(macro, t, f) #define CPP_IFEMPTY1(value, t, f) CPP_IF2(comma_if_empty_##value, t, f) #define CPP_IF2(comma_if_true, t, f) CPP_IF3(comma_if_true t, f) #define CPP_IF3(_, v, ...) v #define qom_private(macro) CPP_IFEMPTY(IMPLEMENTING_##macro,, QEMU_PRIVATE_ATTR) To be used as: qom_private(A9_SCU) MemoryRegion iomem; Credit: https://plus.google.com/u/0/+LinusTorvalds/posts/9gntjh57dXt Paolo