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:
parent
afbf71af24
commit
0973dbd841
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user