]> git.proxmox.com Git - mirror_qemu.git/blame - qobject/qnull.c
qobject: Add a special null QObject
[mirror_qemu.git] / qobject / qnull.c
CommitLineData
481b002c
MA
1/*
2 * QNull
3 *
4 * Copyright (C) 2015 Red Hat, Inc.
5 *
6 * Authors:
7 * Markus Armbruster <armbru@redhat.com>
8 *
9 * This work is licensed under the terms of the GNU LGPL, version 2.1
10 * or later. See the COPYING.LIB file in the top-level directory.
11 */
12
13#include "qemu-common.h"
14#include "qapi/qmp/qobject.h"
15
16static void qnull_destroy_obj(QObject *obj)
17{
18 assert(0);
19}
20
21static const QType qnull_type = {
22 .code = QTYPE_QNULL,
23 .destroy = qnull_destroy_obj,
24};
25
26QObject qnull_ = {
27 .type = &qnull_type,
28 .refcnt = 1,
29};