[glib/wip/matthiasc/try-inlining-magic: 3/3] Work around msvc
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/wip/matthiasc/try-inlining-magic: 3/3] Work around msvc
- Date: Mon, 3 Oct 2022 00:13:52 +0000 (UTC)
commit 8bc146517dc08648f7df7b84a66a14bea88a4555
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Oct 2 20:06:58 2022 -0400
Work around msvc
Just don't bother with inlining for msvc.
glib/gtestutils.c | 8 ++++++++
glib/gtestutils.h | 10 +++++++++-
2 files changed, 17 insertions(+), 1 deletion(-)
---
diff --git a/glib/gtestutils.c b/glib/gtestutils.c
index 7730c77c91..c09b4c5fbc 100644
--- a/glib/gtestutils.c
+++ b/glib/gtestutils.c
@@ -35,9 +35,17 @@
* Since: 2.16
*/
+#ifdef _MSC_VER
+
+#define GLIB_INLINE
+
+#else
+
GLIB_AVAILABLE_IN_ALL
int g_strcmp0 (const char *str1, const char *str2);
+#endif
+
#include "gtestutils.h"
#include "gfileutils.h"
diff --git a/glib/gtestutils.h b/glib/gtestutils.h
index 969c69dda5..e8bef57640 100644
--- a/glib/gtestutils.h
+++ b/glib/gtestutils.h
@@ -238,8 +238,16 @@ typedef void (*GTestFixtureFunc) (gpointer fixture,
} G_STMT_END
#endif /* !G_DISABLE_ASSERT */
+#ifdef _MSC_VER
+
+GLIB_AVAILABLE_IN_ALL
+int g_strcmp0 (const char *str1,
+ const char *str2);
+
+#endif
+
#ifndef GLIB_INLINE
-#define GLIB_INLINE
+#define GLIB_INLINE inline
#endif
GLIB_INLINE int
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]