[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[virt-tools-list] [PATCH 20/47] Make device object struct fully private



Classes should not expose their private bits to each other. Make
the OsinfoDevice private struct truely private.

* osinfo/osinfo_common.h: Remove OsinfoDevicePrivate
* osinfo/osinfo_device.c: Add OsinfoDevicePrivate
* osinfo/osinfo_devicelist.c, osinfo/osinfo_hypervisorlist.c,
  osinfo/osinfo_oslist.c: Change 'int tmp' to 'gboolean unsed'
---
 osinfo/osinfo_common.h         |    5 -----
 osinfo/osinfo_device.c         |    6 ++++++
 osinfo/osinfo_devicelist.c     |    2 +-
 osinfo/osinfo_hypervisorlist.c |    2 +-
 osinfo/osinfo_oslist.c         |    2 +-
 5 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/osinfo/osinfo_common.h b/osinfo/osinfo_common.h
index 1ad5088..1bc60df 100644
--- a/osinfo/osinfo_common.h
+++ b/osinfo/osinfo_common.h
@@ -134,11 +134,6 @@ struct _OsinfoFilterPrivate
     GTree *relationshipConstraints;
 };
 
-struct _OsinfoDevicePrivate
-{
-    int tmp;
-};
-
 struct _OsinfoHypervisorPrivate
 {
     // Key: gchar* (device type)
diff --git a/osinfo/osinfo_device.c b/osinfo/osinfo_device.c
index bcb2fed..a5579d0 100644
--- a/osinfo/osinfo_device.c
+++ b/osinfo/osinfo_device.c
@@ -4,6 +4,12 @@ G_DEFINE_TYPE (OsinfoDevice, osinfo_device, OSINFO_TYPE_ENTITY);
 
 #define OSINFO_DEVICE_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), OSINFO_TYPE_DEVICE, OsinfoDevicePrivate))
 
+struct _OsinfoDevicePrivate
+{
+    gboolean unused;
+};
+
+
 static void osinfo_device_finalize (GObject *object);
 
 static void
diff --git a/osinfo/osinfo_devicelist.c b/osinfo/osinfo_devicelist.c
index 87280d8..21e321e 100644
--- a/osinfo/osinfo_devicelist.c
+++ b/osinfo/osinfo_devicelist.c
@@ -8,7 +8,7 @@ static void osinfo_devicelist_finalize (GObject *object);
 
 struct _OsinfoDeviceListPrivate
 {
-    int tmp;
+    gboolean unused;
 };
 
 static void
diff --git a/osinfo/osinfo_hypervisorlist.c b/osinfo/osinfo_hypervisorlist.c
index 2d6a5b2..57829e8 100644
--- a/osinfo/osinfo_hypervisorlist.c
+++ b/osinfo/osinfo_hypervisorlist.c
@@ -8,7 +8,7 @@ static void osinfo_hypervisorlist_finalize (GObject *object);
 
 struct _OsinfoHypervisorListPrivate
 {
-    int tmp;
+    gboolean unused;
 };
 
 static void
diff --git a/osinfo/osinfo_oslist.c b/osinfo/osinfo_oslist.c
index 49f11a1..c6cf70a 100644
--- a/osinfo/osinfo_oslist.c
+++ b/osinfo/osinfo_oslist.c
@@ -8,7 +8,7 @@ static void osinfo_oslist_finalize (GObject *object);
 
 struct _OsinfoOsListPrivate
 {
-    int tmp;
+    gboolean unused;
 };
 
 static void
-- 
1.7.2.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]