[PATCH 15/34] util: xml: Introduce VIR_AUTOPTR functions for xmlDoc and xmlXPathContext

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

 



We can use our VIR_AUTOPTR machinery also for libxml2's xmlDoc and
xmlXPathContext.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/util/virxml.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/util/virxml.h b/src/util/virxml.h
index b91fedde82..4875e88f2e 100644
--- a/src/util/virxml.h
+++ b/src/util/virxml.h
@@ -244,4 +244,7 @@ VIR_DEFINE_AUTOCLEAN_FUNC(virXPathContextNodeSave, virXPathContextNodeRestore);
                                                                  .node = _ctxt->node}; \
     ignore_value(&_ctxt ## CtxtSave)

+VIR_DEFINE_AUTOPTR_FUNC(xmlDoc, xmlFreeDoc);
+VIR_DEFINE_AUTOPTR_FUNC(xmlXPathContext, xmlXPathFreeContext);
+
 #endif /* LIBVIRT_VIRXML_H */
-- 
2.20.1

--
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