shared: add NM_SWAP() macro

(cherry picked from commit cec06138f1)
This commit is contained in:
Thomas Haller 2020-03-23 08:00:46 +01:00 committed by Beniamino Galvani
parent cdfb762880
commit a5c465848a

View file

@ -744,6 +744,17 @@ NM_G_ERROR_MSG (GError *error)
/*****************************************************************************/
#define NM_SWAP(a, b) \
G_STMT_START { \
typeof (a) _tmp; \
\
_tmp = (a); \
(a) = (b); \
(b) = _tmp; \
} G_STMT_END
/*****************************************************************************/
static inline gboolean
_NM_IN_STRSET_streq (const char *x, const char *s)
{