From 407bc4bf9027f7ac4333e47cd900d773b99a23e3 Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrangé" Date: Mon, 18 Nov 2024 16:12:34 +0100 Subject: qapi: Move include/qapi/qmp/ to include/qobject/ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The general expectation is that header files should follow the same file/path naming scheme as the corresponding source file. There are various historical exceptions to this practice in QEMU, with one of the most notable being the include/qapi/qmp/ directory. Most of the headers there correspond to source files in qobject/. This patch corrects most of that inconsistency by creating include/qobject/ and moving the headers for qobject/ there. This also fixes MAINTAINERS for include/qapi/qmp/dispatch.h: scripts/get_maintainer.pl now reports "QAPI" instead of "No maintainers found". Signed-off-by: Daniel P. Berrangé Reviewed-by: Zhao Liu Acked-by: Halil Pasic #s390x Signed-off-by: Markus Armbruster Message-ID: <20241118151235.2665921-2-armbru@redhat.com> [Rebased] --- include/qobject/qbool.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 include/qobject/qbool.h (limited to 'include/qobject/qbool.h') diff --git a/include/qobject/qbool.h b/include/qobject/qbool.h new file mode 100644 index 0000000000..b348e17867 --- /dev/null +++ b/include/qobject/qbool.h @@ -0,0 +1,31 @@ +/* + * QBool Module + * + * Copyright IBM, Corp. 2009 + * + * Authors: + * Anthony Liguori + * + * This work is licensed under the terms of the GNU LGPL, version 2.1 or later. + * See the COPYING.LIB file in the top-level directory. + * + */ + +#ifndef QBOOL_H +#define QBOOL_H + +#include "qobject/qobject.h" + +struct QBool { + struct QObjectBase_ base; + bool value; +}; + +void qbool_unref(QBool *q); + +G_DEFINE_AUTOPTR_CLEANUP_FUNC(QBool, qbool_unref) + +QBool *qbool_from_bool(bool value); +bool qbool_get_bool(const QBool *qb); + +#endif /* QBOOL_H */ -- cgit 1.4.1