1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-25 01:34:11 +03:00

util: xml: Introduce VIR_AUTOPTR functions for xmlDoc and xmlXPathContext

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

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa 2019-03-08 16:02:27 +01:00
parent afbf71af24
commit 0973dbd841

View File

@ -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 */