Commit cbc209bf authored by Maciej (Matthew) Piechotka's avatar Maciej (Matthew) Piechotka
Browse files

Fix warnings and bump requirements to GLib 2.32

parent 5e1d9b73
......@@ -14,9 +14,13 @@ AC_PROG_LIBTOOL
LIBGEE_LT_VERSION="2:0:0"
AC_SUBST(LIBGEE_LT_VERSION)
GLIB_REQUIRED=2.32
AM_PROG_VALAC([0.17.5])
AC_SUBST(VALAC)
VALAFLAGS=--target-glib=$GLIB_REQUIRED
AC_SUBST(VALAFLAGS)
AC_ARG_ENABLE(doc, AS_HELP_STRING([--enable-doc], [Enable documentation generation]), enable_doc=$enableval, enable_doc=no)
......@@ -50,8 +54,6 @@ AS_IF([test "x$enable_coverage" != xno],
AC_ARG_ENABLE(benchmark, AS_HELP_STRING([--enable-benchmark], [Enable benchmark]), enable_benchmark=$enableval, enable_benchmark=no)
AM_CONDITIONAL(ENABLE_BENCHMARK, test x$enable_benchmark = xyes)
GLIB_REQUIRED=2.12.0
PKG_CHECK_MODULES(GLIB, glib-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED)
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)
......
......@@ -51,7 +51,7 @@ public class Gee.HashMultiMap<K,V> : AbstractMultiMap<K,V> {
*/
public HashMultiMap (owned HashDataFunc? key_hash_func = null, owned EqualDataFunc? key_equal_func = null,
owned HashDataFunc? value_hash_func = null, owned EqualDataFunc? value_equal_func = null) {
base (new HashMap<K, Set<V>> (key_hash_func, key_equal_func, Functions.get_equal_func_for (typeof (Set<V>))));
base (new HashMap<K, Set<V>> (key_hash_func, key_equal_func, Functions.get_equal_func_for (typeof (Set))));
if (value_hash_func == null) {
value_hash_func = Functions.get_hash_func_for (typeof (V));
}
......
......@@ -451,17 +451,13 @@ public class Gee.HazardPointer<G> { // FIXME: Make it a struct
private static void start (ReleasePolicy self) { // FIXME: Make it non-static [bug 659778]
switch (self) {
case HELPER_THREAD:
try {
Thread.create<bool> (() => {
Thread.self<bool> ().set_priority (ThreadPriority.LOW);
while (true) {
Thread.yield ();
attempt_free ();
}
}, false);
} catch (ThreadError error) {
assert_not_reached ();
}
new Thread<bool> ("<<Gee.HazardPointer.Executor>>", () => {
Thread.self<bool> ().set_priority (ThreadPriority.LOW);
while (true) {
Thread.yield ();
attempt_free ();
}
});
break;
case MAIN_LOOP:
Idle.add (() => {
......@@ -622,10 +618,6 @@ public class Gee.HazardPointer<G> { // FIXME: Make it a struct
return _current_context.get ();
}
private inline bool _should_free () {
return (_parent == null && _to_free.size > 0) || _to_free.size >= THRESHOLD;
}
internal Context *_parent;
internal ArrayList<FreeNode *> _to_free;
internal Policy? _policy;
......
......@@ -212,7 +212,7 @@ internal class Gee.ReadOnlyMap<K,V> : Object, Traversable<Map.Entry<K,V>>, Itera
* {@inheritDoc}
*/
public Type element_type {
get { return typeof (Map.Entry<K,V>); }
get { return typeof (Map.Entry); }
}
/**
......
......@@ -42,7 +42,7 @@ public class Gee.TreeMultiMap<K,V> : AbstractMultiMap<K,V> {
* @param value_compare_func an optional value comparator function
*/
public TreeMultiMap (owned CompareDataFunc<K>? key_compare_func = null, owned CompareDataFunc<V>? value_compare_func = null) {
base (new TreeMap<K, Set<V>> (key_compare_func, Functions.get_equal_func_for (typeof (Set<V>))));
base (new TreeMap<K, Set<V>> (key_compare_func, Functions.get_equal_func_for (typeof (Set))));
if (value_compare_func == null) {
value_compare_func = Functions.get_compare_func_for (typeof (V));
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment