提交 96143986 编写于 作者: P Peter Krempa

virsh: Allow using VIR_AUTOPTR for releasing virDomainPtr in virsh

I opted to alias the 'virDomainType' to 'virshDomain' so that it's
obvious in all cases that this is a virsh-only construct. This is also
somewhat consistent with virsh's use of 'virshDomainFree' wrapper for
the freeing function which actually accepts NULL.
Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
上级 2c535e50
......@@ -39,8 +39,11 @@ virshCommandOptDomain(vshControl *ctl,
const vshCmd *cmd,
const char **name);
typedef virDomain virshDomain;
void
virshDomainFree(virDomainPtr dom);
VIR_DEFINE_AUTOPTR_FUNC(virshDomain, virshDomainFree);
void
virshDomainCheckpointFree(virDomainCheckpointPtr chk);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册