From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51108) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTYD2-0002Kz-LB for qemu-devel@nongnu.org; Fri, 28 Mar 2014 10:56:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WTYCw-0007Ww-AU for qemu-devel@nongnu.org; Fri, 28 Mar 2014 10:56:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53965) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTYCw-0007Wi-1q for qemu-devel@nongnu.org; Fri, 28 Mar 2014 10:56:34 -0400 Message-ID: <53358D9B.5090809@redhat.com> Date: Fri, 28 Mar 2014 15:56:27 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1395841365-24319-1-git-send-email-pbonzini@redhat.com> <53358C9F.2040000@suse.de> In-Reply-To: <53358C9F.2040000@suse.de> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH for-2.0] cpu: do not use QOM casts in ENV_GET_CPU List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?ISO-8859-15?Q?Andreas_F=E4rber?= , qemu-devel@nongnu.org, laurent.desnogues@gmail.com Il 28/03/2014 15:52, Andreas F=E4rber ha scritto: > I do wonder if it wouldn't make more sense to simply > #define CPU(obj) ((CPUState *)obj) > which would catch all uses of CPU() while still allowing to change it t= o > #define CPU(obj) dynamic_cast(obj) > or so in the future without touching dozens of places. We can obviously > also take this patch here for 2.0 and then revert and redo differently. I suggest doing a C-cast patch for 2.0, and then possibly revert and=20 redo differently in 2.1.