qobject-internal.h 1008 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * QObject internals
  3. *
  4. * Copyright (C) 2015 Red Hat, Inc.
  5. *
  6. * This work is licensed under the terms of the GNU LGPL, version 2.1
  7. * or later. See the COPYING.LIB file in the top-level directory.
  8. */
  9. #ifndef QOBJECT_INTERNAL_H
  10. #define QOBJECT_INTERNAL_H
  11. #include "qobject/qobject.h"
  12. static inline void qobject_init(QObject *obj, QType type)
  13. {
  14. assert(QTYPE_NONE < type && type < QTYPE__MAX);
  15. obj->base.refcnt = 1;
  16. obj->base.type = type;
  17. }
  18. void qbool_destroy_obj(QObject *obj);
  19. bool qbool_is_equal(const QObject *x, const QObject *y);
  20. void qdict_destroy_obj(QObject *obj);
  21. bool qdict_is_equal(const QObject *x, const QObject *y);
  22. void qlist_destroy_obj(QObject *obj);
  23. bool qlist_is_equal(const QObject *x, const QObject *y);
  24. bool qnull_is_equal(const QObject *x, const QObject *y);
  25. void qnum_destroy_obj(QObject *obj);
  26. bool qnum_is_equal(const QObject *x, const QObject *y);
  27. void qstring_destroy_obj(QObject *obj);
  28. bool qstring_is_equal(const QObject *x, const QObject *y);
  29. #endif