mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-26 20:22:11 +01:00
Merge branch 'fix-c4141' into 'main'
gstring.h/gmacros.h: Avoid compiler warnings on Visual Studio Closes #2905 See merge request GNOME/glib!3285
This commit is contained in:
commit
d8c913ac83
@ -1157,7 +1157,7 @@
|
|||||||
# endif
|
# endif
|
||||||
#elif defined (_MSC_VER)
|
#elif defined (_MSC_VER)
|
||||||
/* Use MSVC specific syntax. */
|
/* Use MSVC specific syntax. */
|
||||||
# if G_CXX_STD_CHECK_VERSION (11) && _MSC_VER >= 1927
|
# if G_CXX_STD_CHECK_VERSION (20) && _MSC_VER >= 1927
|
||||||
# define G_ALWAYS_INLINE [[msvc::forceinline]]
|
# define G_ALWAYS_INLINE [[msvc::forceinline]]
|
||||||
# else
|
# else
|
||||||
# define G_ALWAYS_INLINE __forceinline
|
# define G_ALWAYS_INLINE __forceinline
|
||||||
@ -1202,7 +1202,7 @@
|
|||||||
# if defined (__GNUC__)
|
# if defined (__GNUC__)
|
||||||
# define G_NO_INLINE [[gnu::noinline]]
|
# define G_NO_INLINE [[gnu::noinline]]
|
||||||
# elif defined (_MSC_VER)
|
# elif defined (_MSC_VER)
|
||||||
# if _MSC_VER >= 1927
|
# if G_CXX_STD_CHECK_VERSION (20) && _MSC_VER >= 1927
|
||||||
# define G_NO_INLINE [[msvc::noinline]]
|
# define G_NO_INLINE [[msvc::noinline]]
|
||||||
# else
|
# else
|
||||||
# define G_NO_INLINE __declspec (noinline)
|
# define G_NO_INLINE __declspec (noinline)
|
||||||
@ -1214,7 +1214,7 @@
|
|||||||
#elif defined (_MSC_VER) && (1200 <= _MSC_VER)
|
#elif defined (_MSC_VER) && (1200 <= _MSC_VER)
|
||||||
/* Use MSVC specific syntax. */
|
/* Use MSVC specific syntax. */
|
||||||
/* Use ISO C++11 syntax when the compiler supports it. */
|
/* Use ISO C++11 syntax when the compiler supports it. */
|
||||||
# if G_CXX_STD_CHECK_VERSION (11) && _MSC_VER >= 1927
|
# if G_CXX_STD_CHECK_VERSION (20) && _MSC_VER >= 1927
|
||||||
# define G_NO_INLINE [[msvc::noinline]]
|
# define G_NO_INLINE [[msvc::noinline]]
|
||||||
# else
|
# else
|
||||||
# define G_NO_INLINE __declspec (noinline)
|
# define G_NO_INLINE __declspec (noinline)
|
||||||
|
@ -179,9 +179,15 @@ GString* g_string_append_uri_escaped (GString *string,
|
|||||||
const gchar *reserved_chars_allowed,
|
const gchar *reserved_chars_allowed,
|
||||||
gboolean allow_utf8);
|
gboolean allow_utf8);
|
||||||
|
|
||||||
|
#ifdef G_CAN_INLINE
|
||||||
|
|
||||||
|
#if defined (_MSC_VER) && !defined (__clang__)
|
||||||
|
#pragma warning (push)
|
||||||
|
#pragma warning (disable : 4141) /* silence "warning C4141: 'inline' used more than once" */
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef __GTK_DOC_IGNORE__
|
#ifndef __GTK_DOC_IGNORE__
|
||||||
|
|
||||||
#ifdef G_CAN_INLINE
|
|
||||||
G_ALWAYS_INLINE
|
G_ALWAYS_INLINE
|
||||||
static inline GString*
|
static inline GString*
|
||||||
g_string_append_c_inline (GString *gstring,
|
g_string_append_c_inline (GString *gstring,
|
||||||
@ -267,10 +273,14 @@ g_string_truncate_inline (GString *gstring,
|
|||||||
|
|
||||||
#endif /* G_GNUC_CHECK_VERSION (2, 0) */
|
#endif /* G_GNUC_CHECK_VERSION (2, 0) */
|
||||||
|
|
||||||
#endif /* G_CAN_INLINE */
|
|
||||||
|
|
||||||
#endif /* __GTK_DOC_IGNORE__ */
|
#endif /* __GTK_DOC_IGNORE__ */
|
||||||
|
|
||||||
|
#if defined (_MSC_VER) && !defined (__clang__)
|
||||||
|
#pragma warning (pop) /* #pragma warning (disable : 4141) */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* G_CAN_INLINE */
|
||||||
|
|
||||||
GLIB_DEPRECATED
|
GLIB_DEPRECATED
|
||||||
GString *g_string_down (GString *string);
|
GString *g_string_down (GString *string);
|
||||||
GLIB_DEPRECATED
|
GLIB_DEPRECATED
|
||||||
|
Loading…
x
Reference in New Issue
Block a user