On Fri, Apr 3, 2020 at 5:16 PM Rafael Fonseca <r4f4rfs(a)gmail.com> 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