Zrythm
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
debug.h
1
// SPDX-FileCopyrightText: © 2021-2022 Alexandros Theodotou <alex@zrythm.org>
2
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
3
4
#ifndef __UTILS_DEBUG_H__
5
#define __UTILS_DEBUG_H__
6
13
#define z_return_val_if_fail_cmp(a, comparator, b, val) \
14
if (!(G_LIKELY ((a) comparator (b)))) \
15
{ \
16
g_critical ( \
17
"Assertion failed: %s (%" G_GINT64_FORMAT \
18
") " \
19
"%s %s (%" G_GINT64_FORMAT ")", \
20
#a, (gint64) (a), #comparator, #b, (gint64) (b)); \
21
return val; \
22
}
23
24
#define z_return_if_fail_cmp(a, comparator, b) \
25
z_return_val_if_fail_cmp (a, comparator, b, )
26
27
#define z_warn_if_fail_cmp(a, comparator, b) \
28
if (!(G_LIKELY (a comparator b))) \
29
{ \
30
g_warning ( \
31
"Assertion failed: %s (%" G_GINT64_FORMAT \
32
") " \
33
"%s %s (%" G_GINT64_FORMAT ")", \
34
#a, (gint64) (a), #comparator, #b, (gint64) (b)); \
35
}
36
41
#endif
utils
debug.h
Generated by
1.11.0