From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51124) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YnprS-0003OG-8T for qemu-devel@nongnu.org; Thu, 30 Apr 2015 10:54:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YnprN-00054k-9g for qemu-devel@nongnu.org; Thu, 30 Apr 2015 10:54:46 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37584) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YnprN-00054U-0j for qemu-devel@nongnu.org; Thu, 30 Apr 2015 10:54:41 -0400 Date: Thu, 30 Apr 2015 15:54:36 +0100 From: "Daniel P. Berrange" Message-ID: <20150430145436.GA7110@redhat.com> References: <1430404944-7322-1-git-send-email-berrange@redhat.com> <1430404944-7322-5-git-send-email-berrange@redhat.com> <554241E7.8030407@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <554241E7.8030407@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 04:53:27PM +0200, Paolo Bonzini wrote: > > > On 30/04/2015 16:42, Daniel P. Berrange wrote: > > + * object_new_propv: > > + * @typename: The name of the type of the object to instantiate. > > + * @path: the object path to register under > > + * @id: The unique ID of the object > > + * @errp: pointer to error object > > + * @...: list of property names and values > > + * > > + * This function with initialize a new object using heap allocated memory. > > + * The returned object has a reference count of 1, and will be freed when > > + * the last reference is dropped. > > + * > > + * The @id parameter will be used to register the object in the /objects > > + * hierarchy. > > + * > > + * The variadic parameters are a list of pairs of (propname, propvalue) > > + * strings. The propname of NULL indicates the end of the property > > + * list. If the object implements the user creatable interface, the > > + * object will be marked complete once all the properties have been > > + * processed. > > + * > > + * Error *err = NULL; > > + * Object *obj; > > + * > > + * obj = object_new_propv(TYPE_MEMORY_BACKEND_FILE, > > + * "/objects", > > Only one thing I missed in my previous review---I'd rather make the path > an object, you can easily get it through container_get("/path"). > > I can fix this when committing the patches. Oh, i misunderstood - I thought you only wanted the path. I'm fine with the API either way. 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 :|