summaryrefslogtreecommitdiffstats
path: root/tox.ini
blob: c1993d9ee390d6e21637a1b20345a2967a6aacdc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
[tox]
minversion = 1.6
envlist = docs,docs-linkcheck
skipsdist = true

[testenv:docs]
deps = -r{toxinidir}/etc/requirements.txt
commands =
    sphinx-build -b html -n -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/html
    echo "Generated docs available in {toxinidir}/docs/_build/html"
whitelist_externals = echo

[testenv:docs-linkcheck]
deps = -r{toxinidir}/etc/requirements.txt
commands = sphinx-build -b linkcheck -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/linkcheck
/span> qint_type = { .code = QTYPE_QINT, .destroy = qint_destroy_obj, }; /** * qint_from_int(): Create a new QInt from an int64_t * * Return strong reference. */ QInt *qint_from_int(int64_t value) { QInt *qi; qi = g_malloc(sizeof(*qi)); qi->value = value; QOBJECT_INIT(qi, &qint_type); return qi; } /** * qint_get_int(): Get the stored integer */ int64_t qint_get_int(const QInt *qi) { return qi->value; } /** * qobject_to_qint(): Convert a QObject into a QInt */ QInt *qobject_to_qint(const QObject *obj) { if (qobject_type(obj) != QTYPE_QINT) return NULL; return container_of(obj, QInt, base); } /** * qint_destroy_obj(): Free all memory allocated by a * QInt object */ static void qint_destroy_obj(QObject *obj) { assert(obj != NULL); g_free(qobject_to_qint(obj)); }