qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrange" <berrange@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org, "Andreas Färber" <afaerber@suse.de>
Subject: Re: [Qemu-devel] [PATCH 4/7] qom: add object_new_propv / object_new_proplist constructors
Date: Thu, 30 Apr 2015 16:02:14 +0100	[thread overview]
Message-ID: <20150430150214.GB7110@redhat.com> (raw)
In-Reply-To: <5542438C.60002@redhat.com>

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

  reply	other threads:[~2015-04-30 15:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-30 14:42 [Qemu-devel] [PATCH 0/7] qom: misc fixes & enhancements to support TLS work Daniel P. Berrange
2015-04-30 14:42 ` [Qemu-devel] [PATCH 1/7] qom: fix typename of 'policy' enum property in hostmem obj Daniel P. Berrange
2015-04-30 14:42 ` [Qemu-devel] [PATCH 2/7] qom: document user creatable object types in help text Daniel P. Berrange
2015-04-30 14:42 ` [Qemu-devel] [PATCH 3/7] qom: create objects in two phases Daniel P. Berrange
2015-04-30 14:42 ` [Qemu-devel] [PATCH 4/7] qom: add object_new_propv / object_new_proplist constructors Daniel P. Berrange
2015-04-30 14:53   ` Paolo Bonzini
2015-04-30 14:54     ` Daniel P. Berrange
2015-04-30 15:00   ` Paolo Bonzini
2015-04-30 15:02     ` Daniel P. Berrange [this message]
2015-04-30 14:42 ` [Qemu-devel] [PATCH 5/7] qom: make enum string tables const-correct Daniel P. Berrange
2015-04-30 14:42 ` [Qemu-devel] [PATCH 6/7] qom: add a object_property_add_enum helper method Daniel P. Berrange
2015-04-30 14:42 ` [Qemu-devel] [PATCH 7/7] qom: don't pass string table to object_get_enum method Daniel P. Berrange

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150430150214.GB7110@redhat.com \
    --to=berrange@redhat.com \
    --cc=afaerber@suse.de \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).