Fix C++?
authorJay Krell <jaykrell@microsoft.com>
Fri, 30 Aug 2019 00:35:08 +0000 (17:35 -0700)
committerLarry Ewing <lewing@microsoft.com>
Wed, 4 Sep 2019 17:31:13 +0000 (12:31 -0500)
Commit migrated from https://github.com/mono/mono/commit/8723e49b0efa61d15e2eda74a90ac8a8f7a91b2e

src/mono/mono/eglib/glib.h

index 747576d..1ba1477 100644 (file)
@@ -1416,22 +1416,6 @@ glong     g_utf8_pointer_to_offset (const gchar *str, const gchar *pos);
 #define G_HAVE_API_SUPPORT(x) (x)
 #define G_UNSUPPORTED_API "%s:%d: '%s' not supported.", __FILE__, __LINE__
 #define g_unsupported_api(name) G_STMT_START { g_warning (G_UNSUPPORTED_API, name); } G_STMT_END
-G_END_DECLS
-
-static inline
-void
-mono_qsort (void* base, size_t num, size_t size, int (*compare)(const void*, const void*))
-{
-       g_assert (compare);
-       g_assert (size);
-       if (num < 2 || !size || !base)
-               return;
-       qsort (base, num, size, compare);
-}
-
-#define MONO_DECL_CALLBACK(prefix, ret, name, sig) ret (*name) sig;
-#define MONO_INIT_CALLBACK(prefix, ret, name, sig) prefix ## _ ## name,
 
 // g_free the result
 // No MAX_PATH limit.
@@ -1453,6 +1437,22 @@ mono_get_module_basename (gpointer process, gpointer mod, gunichar2** pstr, guin
 gboolean
 mono_get_current_directory (gunichar2** pstr, guint32* plength);
 
+G_END_DECLS // FIXME: There is more extern C than there should be.
+
+static inline
+void
+mono_qsort (void* base, size_t num, size_t size, int (*compare)(const void*, const void*))
+{
+       g_assert (compare);
+       g_assert (size);
+       if (num < 2 || !size || !base)
+               return;
+       qsort (base, num, size, compare);
+}
+
+#define MONO_DECL_CALLBACK(prefix, ret, name, sig) ret (*name) sig;
+#define MONO_INIT_CALLBACK(prefix, ret, name, sig) prefix ## _ ## name,
+
 // For each allocator; i.e. returning gpointer that needs to be cast.
 // Macros do not recurse, so naming function and macro the same is ok.
 // However these are also already macros.