diff options
| author | Michael Biebl <biebl@debian.org> | 2013-02-03 14:49:22 +0100 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2013-02-03 14:49:22 +0100 |
| commit | 9c202e3e860b3be9e1f8882630b69affbb130102 (patch) | |
| tree | 8202bf39f2129486971fa7d5ae0dee61a561aa53 /include/nm-glib-compat.h | |
| parent | 36cb2f364a821e1be50b23e03a18891ec55adb06 (diff) | |
Imported Upstream version 0.9.7.995 upstream/0.9.7.995
Diffstat (limited to 'include/nm-glib-compat.h')
| -rw-r--r-- | include/nm-glib-compat.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/nm-glib-compat.h b/include/nm-glib-compat.h index f9c1ae49..63d9598d 100644 --- a/include/nm-glib-compat.h +++ b/include/nm-glib-compat.h @@ -74,4 +74,13 @@ p##_get_type (void) \ } #endif +#if !GLIB_CHECK_VERSION(2,34,0) +static inline void +g_type_ensure (GType type) +{ + if (G_UNLIKELY (type == (GType)-1)) + g_error ("can't happen"); +} +#endif + #endif /* NM_GLIB_COMPAT_H */ |