summary refs log tree commit diff
path: root/src/nm-checkpoint.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2016-10-01 00:33:49 +0200
committerMichael Biebl <biebl@debian.org>2016-10-01 00:33:49 +0200
commit270c4830551c9810ad4e83f9a1db2b1cb946208c (patch)
tree5df09188f7e43b70896efb7b6e942e0b130d75d3 /src/nm-checkpoint.c
parent7514efc2f38c9ace4557d4e69d68e7d380389030 (diff)
New upstream version 1.4.2 upstream/1.4.2
Diffstat (limited to 'src/nm-checkpoint.c')
-rw-r--r--src/nm-checkpoint.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/src/nm-checkpoint.c b/src/nm-checkpoint.c
index cb1adc39..605e0700 100644
--- a/src/nm-checkpoint.c
+++ b/src/nm-checkpoint.c
@@ -70,7 +70,7 @@ typedef struct {
 
 struct _NMCheckpoint {
 	NMExportedObject parent;
-	NMCheckpointPrivate priv;
+	NMCheckpointPrivate _priv;
 };
 
 typedef struct {
@@ -79,18 +79,7 @@ typedef struct {
 
 G_DEFINE_TYPE (NMCheckpoint, nm_checkpoint, NM_TYPE_EXPORTED_OBJECT)
 
-#define NM_CHECKPOINT_GET_PRIVATE(self) \
-	({ \
-		/* preserve the const-ness of self. Unfortunately, that
-		 * way, @self cannot be a void pointer */ \
-		typeof (self) _self = (self); \
-		\
-		/* Get compiler error if variable is of wrong type */ \
-		_nm_unused const NMCheckpoint *_self2 = (_self); \
-		\
-		nm_assert (NM_IS_CHECKPOINT (_self)); \
-		&_self->priv; \
-	})
+#define NM_CHECKPOINT_GET_PRIVATE(self) _NM_GET_PRIVATE(self, NMCheckpoint, NM_IS_CHECKPOINT)
 
 NM_GOBJECT_PROPERTIES_DEFINE_BASE (
 	PROP_DEVICES,