[gnome-builder] gstyle: use g_*_weak_pointer
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] gstyle: use g_*_weak_pointer
- Date: Mon, 18 Jun 2018 23:46:31 +0000 (UTC)
commit b32d0b8271d0192fa29652c9be0084fc94f5fb5b
Author: Christian Hergert <chergert redhat com>
Date: Mon Jun 18 16:22:35 2018 -0700
gstyle: use g_*_weak_pointer
src/gstyle/gstyle-utils.h | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/src/gstyle/gstyle-utils.h b/src/gstyle/gstyle-utils.h
index 29742884a..f4fc3a3e7 100644
--- a/src/gstyle/gstyle-utils.h
+++ b/src/gstyle/gstyle-utils.h
@@ -85,10 +85,7 @@ gstyle_utils_cmp_border (GtkBorder border1,
return TRUE;
}
-#define gstyle_clear_weak_pointer(ptr) \
- (*(ptr) ? (g_object_remove_weak_pointer((GObject*)*(ptr), (gpointer*)ptr),*(ptr)=NULL,1) : 0)
-
-#define gstyle_set_weak_pointer(ptr,obj) \
-
((obj!=*(ptr))?(gstyle_clear_weak_pointer(ptr),*(ptr)=obj,((obj)?g_object_add_weak_pointer((GObject*)obj,(gpointer*)ptr),NULL:NULL),1):0)
+#define gstyle_clear_weak_pointer(ptr) g_clear_weak_pointer(ptr)
+#define gstyle_set_weak_pointer(ptr,obj) g_set_weak_pointer(ptr,obj)
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]