From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50802) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YnpqK-0001LT-16 for qemu-devel@nongnu.org; Thu, 30 Apr 2015 10:53:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YnpqG-0004eq-IV for qemu-devel@nongnu.org; Thu, 30 Apr 2015 10:53:35 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56886) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YnpqG-0004ei-Ah for qemu-devel@nongnu.org; Thu, 30 Apr 2015 10:53:32 -0400 Message-ID: <554241E7.8030407@redhat.com> Date: Thu, 30 Apr 2015 16:53:27 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1430404944-7322-1-git-send-email-berrange@redhat.com> <1430404944-7322-5-git-send-email-berrange@redhat.com> In-Reply-To: <1430404944-7322-5-git-send-email-berrange@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 4/7] qom: add object_new_propv / object_new_proplist constructors List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" , qemu-devel@nongnu.org Cc: =?windows-1252?Q?Andreas_F=E4rber?= 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. Paolo