mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2024-12-25 04:25:38 +00:00
0087625b7e
For convenience and clarity, make it possible to call qobject_ref() at the time when the reference is associated with a variable, or argument, by making qobject_ref() return the same pointer as given. Use that to simplify the callers. Backports commit f5a74a5a50387c6f980b2e2f94f062487a1826da from qemu
32 lines
538 B
C
32 lines
538 B
C
/*
|
|
* 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 {
|
|
struct QObjectBase_ base;
|
|
};
|
|
|
|
extern QNull qnull_;
|
|
|
|
static inline QNull *qnull(void)
|
|
{
|
|
return qobject_ref(&qnull_);
|
|
}
|
|
|
|
bool qnull_is_equal(const QObject *x, const QObject *y);
|
|
|
|
#endif /* QNULL_H */
|