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: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 4/7] qom: add object_new_propv / object_new_proplist constructors
Date: Thu, 30 Apr 2015 16:53:27 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0


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



reply via email to

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