[dbus PATCH 1/3] util: Introduce virtDBusUtilTypedParams

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

 



Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
---
 src/util.c |  6 ++++++
 src/util.h | 11 +++++++++++
 2 files changed, 17 insertions(+)

diff --git a/src/util.c b/src/util.c
index b21f2c5..ac965c4 100644
--- a/src/util.c
+++ b/src/util.c
@@ -20,6 +20,12 @@ virtDBusErrorQuark(void)
     return (GQuark) quarkVolatile;
 }
 
+void
+virtDBusUtilTypedParamsClear(virtDBusUtilTypedParams *params)
+{
+    virTypedParamsFree(params->params, params->nparams);
+}
+
 GVariant *
 virtDBusUtilTypedParamsToGVariant(virTypedParameterPtr params,
                                   gint nparams)
diff --git a/src/util.h b/src/util.h
index 7bb4ad6..4ffc15c 100644
--- a/src/util.h
+++ b/src/util.h
@@ -16,6 +16,17 @@ typedef enum {
 GQuark
 virtDBusErrorQuark(void);
 
+struct _virtDBusUtilTypedParams {
+    virTypedParameterPtr params;
+    gint nparams;
+};
+typedef struct _virtDBusUtilTypedParams virtDBusUtilTypedParams;
+
+void
+virtDBusUtilTypedParamsClear(virtDBusUtilTypedParams *params);
+
+G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(virtDBusUtilTypedParams, virtDBusUtilTypedParamsClear);
+
 GVariant *
 virtDBusUtilTypedParamsToGVariant(virTypedParameterPtr params,
                                   gint nparams);
-- 
2.14.3

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux