rendernode: Implement proper GSK_IS_RENDERNODE()
authorBenjamin Otte <otte@redhat.com>
Mon, 10 Jul 2023 04:23:45 +0000 (06:23 +0200)
committerBenjamin Otte <otte@redhat.com>
Mon, 10 Jul 2023 04:32:01 +0000 (06:32 +0200)
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.

gsk/gskrendernode.h

index b1ceec5cea21aba656177d7b54f91f044727edca..f3ae38f6e160e93afc10a248aec9b4076af6d897 100644 (file)
@@ -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 ())