2
0

qnull.c 651 B

123456789101112131415161718192021222324252627282930313233343536
  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. #include "qemu/osdep.h"
  13. #include "qapi/qmp/qnull.h"
  14. #include "qobject-internal.h"
  15. QNull qnull_ = {
  16. .base = {
  17. .type = QTYPE_QNULL,
  18. .refcnt = 1,
  19. },
  20. };
  21. /**
  22. * qnull_is_equal(): Always return true because any two QNull objects
  23. * are equal.
  24. */
  25. bool qnull_is_equal(const QObject *x, const QObject *y)
  26. {
  27. return true;
  28. }
  29. void qnull_unref(QNull *q)
  30. {
  31. qobject_unref(q);
  32. }