From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47349) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YpcMK-0001hA-DU for qemu-devel@nongnu.org; Tue, 05 May 2015 08:54:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YpcMF-00030K-Dz for qemu-devel@nongnu.org; Tue, 05 May 2015 08:54:00 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53926) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YpcMF-0002zP-5H for qemu-devel@nongnu.org; Tue, 05 May 2015 08:53:55 -0400 Date: Tue, 5 May 2015 08:53:50 -0400 From: Luiz Capitulino Message-ID: <20150505085350.795f9ce3@redhat.com> In-Reply-To: <874mnr19g8.fsf@neno.neno> References: <1429975686-19494-1-git-send-email-ehabkost@redhat.com> <553BC973.2030506@suse.de> <20150427172320.GC25766@thinpad.lan.raisama.net> <874mnr19g8.fsf@neno.neno> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] QJSON: Use OBJECT_CHECK List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Juan Quintela Cc: qemu-devel@nongnu.org, agraf@suse.de, Michael Roth , Eduardo Habkost , Andreas =?UTF-8?B?RsOkcmJlcg==?= On Tue, 05 May 2015 14:43:19 +0200 Juan Quintela wrote: > Eduardo Habkost wrote: > > On Sat, Apr 25, 2015 at 07:05:55PM +0200, Andreas F=C3=A4rber wrote: > >> Am 25.04.2015 um 17:28 schrieb Eduardo Habkost: > >> > The QJSON code used casts to (QJSON*) directly, instead of OBJECT_CH= ECK. > >> > There were even some functions using object_dynamic_cast() calls > >> > followed by assert(), which is exactly what OBJECT_CHECK does (by > >> > calling object_dynamic_cast_assert()). > >>=20 > >> Suggest s/OBJECT_CHECK/OBJECT_CHECK()/g everywhere for clarity. > > > > I assume it can be fixed during commit by whoever is going to queue it. > > > >>=20 > >> >=20 > >> > Signed-off-by: Eduardo Habkost > >> > --- > >> > qjson.c | 10 +++++----- > >> > 1 file changed, 5 insertions(+), 5 deletions(-) > >>=20 > >> Reviewed-by: Andreas F=C3=A4rber > >>=20 > >> Wasn't aware QJSON is using QOM - assuming this will go through some > >> QAPI/QMP tree. > > > > The only user of qjson.c right now is migration code. Should it go thro= ugh > > the migration tree? >=20 >=20 > I will take it, but I trust your reviews-by O:-) I've already applied this one to the QMP tree. >=20 > > > > Also, why do we have two JSON writers in QEMU? And why do they have > > exactly the same name? >=20 > Alex? I guess alex have this implementation when he did the code long > ago? >=20 > Later, Juan. >=20