mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-21 10:52:22 +00:00
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: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
2c535e50f5
commit
96143986ca
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user