diff options
| author | Michael Biebl <biebl@debian.org> | 2012-06-29 20:12:59 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2012-06-29 20:12:59 +0200 |
| commit | ec7b2a4d322996da1e4b221f2f713652bf868d3b (patch) | |
| tree | 88cd588a74c0de932f7cac871273b08b86fd759c /include/nm-glib-compat.h | |
| parent | 1376a21247cfd9d8bb1d4da7195112d03ff6e870 (diff) | |
| parent | 867254ea7c2b193fecf8cd36cc6e5dc53c290d92 (diff) | |
Merge tag 'upstream/0.9.5.95' into experimental
Upstream version 0.9.5.95
Diffstat (limited to 'include/nm-glib-compat.h')
| -rw-r--r-- | include/nm-glib-compat.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/nm-glib-compat.h b/include/nm-glib-compat.h index 30b83e0d..3b772f4f 100644 --- a/include/nm-glib-compat.h +++ b/include/nm-glib-compat.h @@ -42,6 +42,16 @@ g_simple_async_result_set_from_error (result, __error); \ g_error_free (__error); \ } G_STMT_END + +#define g_clear_object(object_ptr) \ + G_STMT_START { \ + GObject **__obj_p = (gpointer) (object_ptr); \ + if (*__obj_p) { \ + g_object_unref (*__obj_p); \ + *__obj_p = NULL; \ + } \ + } G_STMT_END + #endif #endif /* NM_GLIB_COMPAT_H */ |