qapi/qnull: Add own header

Backports commit 84be629d5545b5ccc5bff2824e4288677e27de9c from qemu
This commit is contained in:
Max Reitz 2018-03-08 08:34:55 -05:00 committed by Lioncash
parent f89de73110
commit e42e3307f7
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7
7 changed files with 33 additions and 15 deletions

View file

@ -15,7 +15,6 @@
#include "qapi/qmp/qobject.h"
#include "qapi/qmp/qlist.h"
#include "qapi/qmp/qnum.h"
#include "qemu/queue.h"
#include "unicorn/platform.h"

View file

@ -14,7 +14,6 @@
#define QLIST_H
#include "qapi/qmp/qobject.h"
#include "qapi/qmp/qnum.h"
#include "qemu/queue.h"
typedef struct QListEntry {

View file

@ -0,0 +1,30 @@
/*
* QNull
*
* Copyright (C) 2015 Red Hat, Inc.
*
* Authors:
* Markus Armbruster <armbru@redhat.com>
*
* 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 QNULL_H
#define QNULL_H
#include "qapi/qmp/qobject.h"
struct QNull {
QObject base;
};
extern QNull qnull_;
static inline QNull *qnull(void)
{
QINCREF(&qnull_);
return &qnull_;
}
#endif /* QNULL_H */

View file

@ -99,16 +99,4 @@ static inline QType qobject_type(const QObject *obj)
return obj->type;
}
struct QNull {
QObject base;
};
extern QNull qnull_;
static inline QNull *qnull(void)
{
QINCREF(&qnull_);
return &qnull_;
}
#endif /* QOBJECT_H */

View file

@ -12,6 +12,7 @@
#include "qapi/clone-visitor.h"
#include "qapi/visitor-impl.h"
#include "qapi/error.h"
#include "qapi/qmp/qnull.h"
struct QapiCloneVisitor {
Visitor visitor;

View file

@ -16,6 +16,7 @@
#include "qapi/string-input-visitor.h"
#include "qapi/visitor-impl.h"
#include "qapi/qmp/qerror.h"
#include "qapi/qmp/qnull.h"
#include "qemu/queue.h"
#include "qemu/range.h"
#include <stdlib.h> // strtoll

View file

@ -11,7 +11,7 @@
*/
#include "qemu-common.h"
#include "qapi/qmp/qobject.h"
#include "qapi/qmp/qnull.h"
QNull qnull_ = {
{