Skip to content

Commit 4204890

Browse files
committed
cfg: Add version check macros for GLib, GTK and ATK
Add GLIB_CHECK_VERSION(), GTK_CHECK_VERSION() and ATK_CHECK_VERSION() to fix undefined function-like macro error.
1 parent 92a028c commit 4204890

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

cfg/gtk.cfg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23079,4 +23079,8 @@
2307923079
<define name="GTK_PRIORITY_HIGH" value="G_PRIORITY_HIGH"/>
2308023080
<define name="GTK_PRIORITY_RESIZE" value="(G_PRIORITY_HIGH_IDLE+10)"/>
2308123081
<define name="GTK_PRIORITY_REDRAW" value="(G_PRIORITY_HIGH_IDLE+20)"/>
23082+
<!-- version check for GLib, ATK and GTK -->
23083+
<define name="GLIB_CHECK_VERSION(major, minor, micro)" value="1"/>
23084+
<define name="ATK_CHECK_VERSION(major, minor, micro)" value="1"/>
23085+
<define name="GTK_CHECK_VERSION(major, minor, micro)" value="1"/>
2308223086
</def>

test/cfg/gtk.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@
1313
#include <glib/gi18n.h>
1414

1515

16+
#if GLIB_CHECK_VERSION(2, 3, 4)
17+
#endif
18+
#if GTK_CHECK_VERSION(4, 5, 6)
19+
#endif
20+
#if ATK_CHECK_VERSION(2, 3, 6)
21+
#endif
22+
1623
void validCode(int argInt, GHashTableIter * hash_table_iter, GHashTable * hash_table)
1724
{
1825
g_assert_cmpint(4 + 1, >=, 5);

0 commit comments

Comments
 (0)