lib: fix compilation for glib < 2.40
authorSimon Marchi <simon.marchi@efficios.com>
Thu, 27 Jun 2019 20:03:55 +0000 (16:03 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Fri, 28 Jun 2019 19:38:29 +0000 (15:38 -0400)
commite74dbb3322844980db73bcd994891c48c68be862
tree5b74437dc6693ee117f270ff32a5a93246523678
parent644e036445497ef69ccf946f0700da20a5bae84f
lib: fix compilation for glib < 2.40

Code from commit "lib: add logic in auto-seek to recreate stream state"
uses the return value of function g_hash_table_insert to validate that
the inserted key did not previously exist in the hash table.  This
feature was introduced in glib 2.40, before that the function returned
void.

To avoid breaking compatibility with glib < 2.40, we can do a lookup
before inserting to achieve the same result.

Change-Id: Ibd5f58fb6ab8f083a3152105db9e05522893132c
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1560
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
src/lib/graph/iterator.c
This page took 0.024162 seconds and 4 git commands to generate.