qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 4/7] qom: add object_new_propv / object_new_prop


From: Daniel P. Berrange
Subject: Re: [Qemu-devel] [PATCH 4/7] qom: add object_new_propv / object_new_proplist constructors
Date: Thu, 30 Apr 2015 15:54:36 +0100
User-agent: Mutt/1.5.23 (2014-03-12)

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 :|



reply via email to

[Prev in Thread] Current Thread [Next in Thread]