diff options
author | Zoltan Varga <vargaz@gmail.com> | 2010-10-22 11:28:20 +0400 |
---|---|---|
committer | Zoltan Varga <vargaz@gmail.com> | 2010-10-22 11:28:47 +0400 |
commit | 51898348412b760ad785891a10c1761e049c1d4e (patch) | |
tree | aa013714dc7720ea103641dbc8c49f3801aca990 /eglib | |
parent | 85cc330c95586a606023f07633f36cd212ff1ebf (diff) |
Fix test compilation with older glibs.
Diffstat (limited to 'eglib')
-rw-r--r-- | eglib/test/hashtable.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/eglib/test/hashtable.c b/eglib/test/hashtable.c index 5215a53bd02..8eb98852fd1 100644 --- a/eglib/test/hashtable.c +++ b/eglib/test/hashtable.c @@ -133,6 +133,7 @@ RESULT hash_grow (void) RESULT hash_iter (void) { +#if !defined(GLIB_MAJOR_VERSION) || GLIB_CHECK_VERSION(2, 16, 0) GHashTable *hash = g_hash_table_new_full (g_direct_hash, g_direct_equal, NULL, NULL); GHashTableIter iter; int i, sum, keys_sum, values_sum; @@ -156,6 +157,10 @@ RESULT hash_iter (void) return FAILED ("Did not find all key-value pairs"); g_hash_table_destroy (hash); return NULL; +#else + /* GHashTableIter was added in glib 2.16 */ + return NULL; +#endif } static Test hashtable_tests [] = { |