The SSH host key has changed on 8 April, 2022 to this one: SHA256:573uTBSeh74kvOo0HJXi5ijdzRm8me27suzNEDlGyrQ

Backport g_assert_null() and g_assert_nonnull()

These were added in newer GLibbversions, but upgrading requirements
just because of these would be an overkill.
arabic-lots
Gergely Polonkai 8 years ago
parent 064d39b970
commit 93d0fd68aa
  1. 18
      tests/test-asserts.h

@ -24,4 +24,22 @@
} \
} G_STMT_END
/* g_assert_null() and g_assert_nonnull() were defined in 2.36 and
* 2.40. Requiring a newer GLib just because of this would be an
* overkill, so let's just backport them:
*/
#ifndef g_assert_null
#define g_assert_null(expr) do { if G_LIKELY ((expr) == NULL) ; else \
g_assertion_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \
"'" #expr "' should be NULL"); \
} while (0)
#endif
#ifndef g_assert_nonnull
#define g_assert_nonnull(expr) do { if G_LIKELY ((expr) != NULL) ; else \
g_assertion_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \
"'" #expr "' should not be NULL"); \
} while (0)
#endif
#endif /* __SWE_GLIB_TEST_ASSERTS_H__ */

Loading…
Cancel
Save