From nobody Tue Feb 10 15:01:33 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1517484269614136.0083108847823; Thu, 1 Feb 2018 03:24:29 -0800 (PST) Received: from localhost ([::1]:56910 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ehCyi-0002Dw-NR for importer@patchew.org; Thu, 01 Feb 2018 06:24:28 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37912) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ehCtJ-0006Jc-BL for qemu-devel@nongnu.org; Thu, 01 Feb 2018 06:18:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ehCtH-0004yJ-Ea for qemu-devel@nongnu.org; Thu, 01 Feb 2018 06:18:53 -0500 Received: from mx1.redhat.com ([209.132.183.28]:52644) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ehCtH-0004xc-5L for qemu-devel@nongnu.org; Thu, 01 Feb 2018 06:18:51 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7DAF1BE28E; Thu, 1 Feb 2018 11:18:50 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-116-148.ams2.redhat.com [10.36.116.148]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DC7C15C8B2; Thu, 1 Feb 2018 11:18:49 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 59F3E1138651; Thu, 1 Feb 2018 12:18:46 +0100 (CET) From: Markus Armbruster To: qemu-devel@nongnu.org Date: Thu, 1 Feb 2018 12:18:34 +0100 Message-Id: <20180201111846.21846-8-armbru@redhat.com> In-Reply-To: <20180201111846.21846-1-armbru@redhat.com> References: <20180201111846.21846-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Thu, 01 Feb 2018 11:18:50 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v3 07/19] Typedef the subtypes of QObject in qemu/typedefs.h, too X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: f4bug@amsat.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" This renders many inclusions of qapi/qmp/q*.h superfluous. They'll be dropped in the next few commits. Reviewed-by: Eric Blake Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Markus Armbruster --- include/qapi/qmp/qbool.h | 4 ++-- include/qapi/qmp/qdict.h | 4 ++-- include/qapi/qmp/qlist.h | 4 ++-- include/qapi/qmp/qnum.h | 4 ++-- include/qapi/qmp/qstring.h | 4 ++-- include/qemu/typedefs.h | 7 ++++++- 6 files changed, 16 insertions(+), 11 deletions(-) diff --git a/include/qapi/qmp/qbool.h b/include/qapi/qmp/qbool.h index f77ea86c4e..629c508d34 100644 --- a/include/qapi/qmp/qbool.h +++ b/include/qapi/qmp/qbool.h @@ -16,10 +16,10 @@ =20 #include "qapi/qmp/qobject.h" =20 -typedef struct QBool { +struct QBool { QObject base; bool value; -} QBool; +}; =20 QBool *qbool_from_bool(bool value); bool qbool_get_bool(const QBool *qb); diff --git a/include/qapi/qmp/qdict.h b/include/qapi/qmp/qdict.h index fc218e7be6..d0c298114e 100644 --- a/include/qapi/qmp/qdict.h +++ b/include/qapi/qmp/qdict.h @@ -27,11 +27,11 @@ typedef struct QDictEntry { QLIST_ENTRY(QDictEntry) next; } QDictEntry; =20 -typedef struct QDict { +struct QDict { QObject base; size_t size; QLIST_HEAD(,QDictEntry) table[QDICT_BUCKET_MAX]; -} QDict; +}; =20 /* Object API */ QDict *qdict_new(void); diff --git a/include/qapi/qmp/qlist.h b/include/qapi/qmp/qlist.h index ec3fcc1a4c..632b7ef2c1 100644 --- a/include/qapi/qmp/qlist.h +++ b/include/qapi/qmp/qlist.h @@ -23,10 +23,10 @@ typedef struct QListEntry { QTAILQ_ENTRY(QListEntry) next; } QListEntry; =20 -typedef struct QList { +struct QList { QObject base; QTAILQ_HEAD(,QListEntry) head; -} QList; +}; =20 #define qlist_append(qlist, obj) \ qlist_append_obj(qlist, QOBJECT(obj)) diff --git a/include/qapi/qmp/qnum.h b/include/qapi/qmp/qnum.h index c3d86794bb..15e3971c7f 100644 --- a/include/qapi/qmp/qnum.h +++ b/include/qapi/qmp/qnum.h @@ -44,7 +44,7 @@ typedef enum { * in range: qnum_get_try_int() / qnum_get_try_uint() check range and * convert under the hood. */ -typedef struct QNum { +struct QNum { QObject base; QNumKind kind; union { @@ -52,7 +52,7 @@ typedef struct QNum { uint64_t u64; double dbl; } u; -} QNum; +}; =20 QNum *qnum_from_int(int64_t value); QNum *qnum_from_uint(uint64_t value); diff --git a/include/qapi/qmp/qstring.h b/include/qapi/qmp/qstring.h index 65c05a9be5..98070ef3d6 100644 --- a/include/qapi/qmp/qstring.h +++ b/include/qapi/qmp/qstring.h @@ -15,12 +15,12 @@ =20 #include "qapi/qmp/qobject.h" =20 -typedef struct QString { +struct QString { QObject base; char *string; size_t length; size_t capacity; -} QString; +}; =20 QString *qstring_new(void); QString *qstring_from_str(const char *str); diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h index 9bd7a834ba..78e2f08c0b 100644 --- a/include/qemu/typedefs.h +++ b/include/qemu/typedefs.h @@ -92,8 +92,13 @@ typedef struct QemuOptsList QemuOptsList; typedef struct QEMUSGList QEMUSGList; typedef struct QEMUTimer QEMUTimer; typedef struct QEMUTimerListGroup QEMUTimerListGroup; -typedef struct QObject QObject; +typedef struct QBool QBool; +typedef struct QDict QDict; +typedef struct QList QList; typedef struct QNull QNull; +typedef struct QNum QNum; +typedef struct QObject QObject; +typedef struct QString QString; typedef struct RAMBlock RAMBlock; typedef struct Range Range; typedef struct SerialState SerialState; --=20 2.13.6