1481b002cSMarkus Armbruster /* 2481b002cSMarkus Armbruster * QNull 3481b002cSMarkus Armbruster * 4481b002cSMarkus Armbruster * Copyright (C) 2015 Red Hat, Inc. 5481b002cSMarkus Armbruster * 6481b002cSMarkus Armbruster * Authors: 7481b002cSMarkus Armbruster * Markus Armbruster <armbru@redhat.com> 8481b002cSMarkus Armbruster * 9481b002cSMarkus Armbruster * This work is licensed under the terms of the GNU LGPL, version 2.1 10481b002cSMarkus Armbruster * or later. See the COPYING.LIB file in the top-level directory. 11481b002cSMarkus Armbruster */ 12481b002cSMarkus Armbruster 13f2ad72b3SPeter Maydell #include "qemu/osdep.h" 1484be629dSMax Reitz #include "qapi/qmp/qnull.h" 1580d71121SMarkus Armbruster #include "qobject-internal.h" 16481b002cSMarkus Armbruster 17006ca09fSMarkus Armbruster QNull qnull_ = { 18006ca09fSMarkus Armbruster .base = { 1955e1819cSEric Blake .type = QTYPE_QNULL, 20481b002cSMarkus Armbruster .refcnt = 1, 21006ca09fSMarkus Armbruster }, 22481b002cSMarkus Armbruster }; 23b38dd678SMax Reitz 24b38dd678SMax Reitz /** 25b38dd678SMax Reitz * qnull_is_equal(): Always return true because any two QNull objects 26b38dd678SMax Reitz * are equal. 27b38dd678SMax Reitz */ qnull_is_equal(const QObject * x,const QObject * y)28b38dd678SMax Reitzbool qnull_is_equal(const QObject *x, const QObject *y) 29b38dd678SMax Reitz { 30b38dd678SMax Reitz return true; 31b38dd678SMax Reitz } 32*d709bbf3SMarc-André Lureau qnull_unref(QNull * q)33*d709bbf3SMarc-André Lureauvoid qnull_unref(QNull *q) 34*d709bbf3SMarc-André Lureau { 35*d709bbf3SMarc-André Lureau qobject_unref(q); 36*d709bbf3SMarc-André Lureau } 37