提交 3372c16a 编写于 作者: J Ján Tomko

util: xml: use g_auto directly for VIR_XPATH_NODE_AUTORESTORE

Since commit 44e7f029
    util: rewrite auto cleanup macros to use glib's equivalent

VIR_AUTOCLEAN is just an alias for g_auto. Use the GLib macros
directly instead of our custom aliases.
Signed-off-by: NJán Tomko <jtomko@redhat.com>
Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
上级 67e72053
......@@ -233,7 +233,7 @@ typedef virXPathContextNodeSave *virXPathContextNodeSavePtr;
void
virXPathContextNodeRestore(virXPathContextNodeSavePtr save);
VIR_DEFINE_AUTOCLEAN_FUNC(virXPathContextNodeSave, virXPathContextNodeRestore);
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(virXPathContextNodeSave, virXPathContextNodeRestore);
/**
* VIR_XPATH_NODE_AUTORESTORE:
......@@ -243,8 +243,8 @@ VIR_DEFINE_AUTOCLEAN_FUNC(virXPathContextNodeSave, virXPathContextNodeRestore);
* node pointer is reset to the original value when this macro was used.
*/
#define VIR_XPATH_NODE_AUTORESTORE(_ctxt) \
VIR_AUTOCLEAN(virXPathContextNodeSave) _ctxt ## CtxtSave = { .ctxt = _ctxt,\
.node = _ctxt->node}; \
g_auto(virXPathContextNodeSave) _ctxt ## CtxtSave = { .ctxt = _ctxt,\
.node = _ctxt->node}; \
ignore_value(&_ctxt ## CtxtSave)
VIR_DEFINE_AUTOPTR_FUNC(xmlDoc, xmlFreeDoc);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册