aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Makefile.am2
-rw-r--r--src/mm-utils.c47
-rw-r--r--src/mm-utils.h12
3 files changed, 1 insertions, 60 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 32074015..26074bb7 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -306,7 +306,7 @@ ModemManager_SOURCES = \
main.c \
mm-context.h \
mm-context.c \
- mm-utils.h mm-utils.c \
+ mm-utils.h \
mm-private-boxed-types.h \
mm-private-boxed-types.c \
mm-auth-provider.h \
diff --git a/src/mm-utils.c b/src/mm-utils.c
deleted file mode 100644
index 95fbb552..00000000
--- a/src/mm-utils.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details:
- *
- * Singleton support imported from NetworkManager.
- * (C) Copyright 2014 Red Hat, Inc.
- *
- * GPtrArray lookup with GEqualFunc imported from GLib 2.48
- */
-
-#include "mm-utils.h"
-
-#if !GLIB_CHECK_VERSION(2,54,0)
-
-gboolean
-mm_ptr_array_find_with_equal_func (GPtrArray *haystack,
- gconstpointer needle,
- GEqualFunc equal_func,
- guint *index_)
-{
- guint i;
-
- g_return_val_if_fail (haystack != NULL, FALSE);
-
- if (equal_func == NULL)
- equal_func = g_direct_equal;
-
- for (i = 0; i < haystack->len; i++) {
- if (equal_func (g_ptr_array_index (haystack, i), needle)) {
- if (index_ != NULL)
- *index_ = i;
- return TRUE;
- }
- }
-
- return FALSE;
-}
-
-#endif
diff --git a/src/mm-utils.h b/src/mm-utils.h
index 613205a3..43fcbfef 100644
--- a/src/mm-utils.h
+++ b/src/mm-utils.h
@@ -80,16 +80,4 @@
} \
MM_DEFINE_SINGLETON_DESTRUCTOR(TYPE)
-
-#if !GLIB_CHECK_VERSION(2,54,0)
-
-/* Pointer Array lookup with a GEqualFunc, imported from GLib 2.54 */
-#define g_ptr_array_find_with_equal_func mm_ptr_array_find_with_equal_func
-gboolean mm_ptr_array_find_with_equal_func (GPtrArray *haystack,
- gconstpointer needle,
- GEqualFunc equal_func,
- guint *index_);
-
-#endif
-
#endif /* MM_UTILS_H */