From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53032) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ynpyo-0007WY-RR for qemu-devel@nongnu.org; Thu, 30 Apr 2015 11:02:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ynpyl-0007eD-9G for qemu-devel@nongnu.org; Thu, 30 Apr 2015 11:02:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35632) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ynpyl-0007e9-3x for qemu-devel@nongnu.org; Thu, 30 Apr 2015 11:02:19 -0400 Date: Thu, 30 Apr 2015 16:02:14 +0100 From: "Daniel P. Berrange" Message-ID: <20150430150214.GB7110@redhat.com> References: <1430404944-7322-1-git-send-email-berrange@redhat.com> <1430404944-7322-5-git-send-email-berrange@redhat.com> <5542438C.60002@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <5542438C.60002@redhat.com> Subject: Re: [Qemu-devel] [PATCH 4/7] qom: add object_new_propv / object_new_proplist constructors Reply-To: "Daniel P. Berrange" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org, Andreas =?utf-8?Q?F=C3=A4rber?= On Thu, Apr 30, 2015 at 05:00:28PM +0200, Paolo Bonzini wrote: > > > On 30/04/2015 16:42, Daniel P. Berrange wrote: > > + propname = va_arg(vargs, char *); > > + while (propname != NULL) { > > + const char *value = va_arg(vargs, char *); > > + > > + g_assert(value != NULL); > > + object_property_parse(obj, value, propname, errp); > > + if (*errp) { > > + goto error; > > + } > > + propname = va_arg(vargs, char *); > > + } > > + > > + object_property_add_child(container_get(object_get_root(), path), > > + id, obj, errp); > > + if (*errp) { > > + goto error; > > + } > > + > > + if (object_dynamic_cast(obj, TYPE_USER_CREATABLE)) { > > + user_creatable_complete(obj, errp); > > + if (*errp) { > > + object_property_del(container_get(object_get_root(), path), > > + id, &error_abort); > > Easier: > > object_unparent(obj); > > > + goto error; > > + } > > + } > > + > > + return obj; > > And another one: do we want to unref the object here, since we've added > a stable reference via object_property_add_child? > > Do you prefer me too apply patches 1-2-3-5-6-7, minus the testcases, or > do you simply want to resubmit? I'll resubmit in a short while. Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|