Re: [PATCH 15/36] datatypes: convert virDomainCheckpoint to GObject

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Apr 3, 2020 at 5:16 PM Rafael Fonseca <r4f4rfs@xxxxxxxxx> wrote:
>
> +#define VIR_TYPE_DOMAIN_CHECKPOINT vir_domain_checkpoint_get_type()
> +G_DECLARE_FINAL_TYPE(virDomainCheckpoint,
> +                     vir_domain_checkpoint,
> +                     VIR,
> +                     DOMAIN_CHECKPOINT,
> +                     GObject);
> +
>  extern virClassPtr virAdmConnectClass;
>
>  #define VIR_TYPE_ADM_SERVER vir_adm_server_get_type()
> @@ -327,8 +333,8 @@ G_DECLARE_FINAL_TYPE(virAdmClient, vir_adm_client, VIR, ADM_CLIENT, GObject);
>
>  #define virCheckDomainCheckpointReturn(obj, retval) \
>      do { \
> -        virDomainCheckpointPtr _check = (obj); \
> -        if (!virObjectIsClass(_check, virDomainCheckpointClass) || \
> +        virDomainCheckpointPtr _check = VIR_DOMAIN_CHECKPOINT(obj); \
> +        if (!G_IS_OBJECT(_check) || !(G_OBJECT_TYPE(_check) == VIR_TYPE_DOMAIN_CHECKPOINT) || \

I guess `VIR_IS_DOMAIN_CHECKPOINT` created by `G_DECLARE_FINAL_TYPE`
is enough here for this check?


Att
-- 
Rafael Fonseca






[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux