From: Benjamin Otte Date: Mon, 10 Jul 2023 04:23:45 +0000 (+0200) Subject: rendernode: Implement proper GSK_IS_RENDERNODE() X-Git-Tag: archive/raspbian/4.12.3+ds-1+rpi1~1^2^2^2~22^2~1^2~66^2~2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=465a34e6b0ef9654423c32d389dbb8ba6af40cdb;p=gtk4.git rendernode: Implement proper GSK_IS_RENDERNODE() Use G_TYPE_CHECK_INSTANCE_TYPE() instead of just checking for != NULL. After all, this is a GTypeInstance. Also fixes some gcc complaints when checking node == NULL || GSK_IS_RENDERNODE (node) which gcc was convinced would be always true. --- diff --git a/gsk/gskrendernode.h b/gsk/gskrendernode.h index b1ceec5cea..f3ae38f6e1 100644 --- a/gsk/gskrendernode.h +++ b/gsk/gskrendernode.h @@ -31,7 +31,7 @@ G_BEGIN_DECLS #define GSK_TYPE_RENDER_NODE (gsk_render_node_get_type ()) -#define GSK_IS_RENDER_NODE(obj) ((obj) != NULL) +#define GSK_IS_RENDER_NODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GSK_TYPE_RENDER_NODE)) #define GSK_SERIALIZATION_ERROR (gsk_serialization_error_quark ())