From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60569) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bpP23-0002HE-J4 for qemu-devel@nongnu.org; Wed, 28 Sep 2016 20:17:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bpP1z-0002zR-8q for qemu-devel@nongnu.org; Wed, 28 Sep 2016 20:16:58 -0400 Received: from ozlabs.org ([103.22.144.67]:41979) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bpP1y-0002yR-GZ for qemu-devel@nongnu.org; Wed, 28 Sep 2016 20:16:55 -0400 From: David Gibson Date: Thu, 29 Sep 2016 10:16:41 +1000 Message-Id: <1475108205-6043-1-git-send-email-david@gibson.dropbear.id.au> Subject: [Qemu-devel] [RFC 0/4] QOM class properties - do we need them? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: afaerber@suse.de, peter.maydell@linaro.org Cc: armbru@redhat.com, pbonzini@redhat.com, lcapitulino@redhat.com, qemu-devel@nongnu.org, David Gibson QOM has the concept of both "object class" properties and "object instance" properties. The accessor functions installed for the rarely-used class properties still take an Object *, so the *value* of such properties is still per-instance; it's just the *existence* (and type) of the property that is per-class. Of course, that's also true in practice for the great majority of "instance" properties, because they're created identically and unconditionally for every instance from the per-class instance_init hook. This also means that the (unused) object_class_property_add_*_ptr() functions don't make a lot of sense, since they require a fixed pointer which means the value of such a property would only be per-class. Given that, is there really any value to supporting the "class" properties in addition to the "instance" properties? This series is an RFC which removes all support for class properties, changing the few existing users to instance properties instead. Alternatively, if we *don't* want to remove class properties, should we instead be trying to convert the many, many "instance" properties whose existence is actually per-class to be class properties? David Gibson (4): qcrypto: Remove usage of class properties s390: Don't use class properties tests: Remove tests for class properties qom: Abolish class properties crypto/secret.c | 58 +++++++------- crypto/tlscreds.c | 44 +++++----- crypto/tlscredsanon.c | 16 ++-- crypto/tlscredsx509.c | 26 +++--- include/qom/object.h | 42 ---------- qom/object.c | 195 --------------------------------------------- target-s390x/cpu.c | 1 - target-s390x/cpu_models.c | 47 +++++------ tests/check-qom-proplist.c | 30 +++---- 9 files changed, 106 insertions(+), 353 deletions(-) -- 2.7.4