Return a bool from pixman_image_unref.
Returns TRUE when the refcount reaches 0 and the image is freed.
diff --git a/pixman/pixman-image.c b/pixman/pixman-image.c
index ca186a3..2cbf88c 100644
--- a/pixman/pixman-image.c
+++ b/pixman/pixman-image.c
@@ -106,7 +106,8 @@
return image;
}
-void
+/* returns TRUE when the image is freed */
+pixman_bool_t
pixman_image_unref (pixman_image_t *image)
{
image_common_t *common = (image_common_t *)image;
@@ -146,7 +147,11 @@
free (image->bits.free_me);
free (image);
+
+ return TRUE;
}
+
+ return FALSE;
}
/* Constructors */
diff --git a/pixman/pixman.h b/pixman/pixman.h
index 74358e0..ae5aa7a 100644
--- a/pixman/pixman.h
+++ b/pixman/pixman.h
@@ -451,7 +451,7 @@
/* Destructor */
pixman_image_t *pixman_image_ref (pixman_image_t *image);
-void pixman_image_unref (pixman_image_t *image);
+pixman_bool_t pixman_image_unref (pixman_image_t *image);
/* Set properties */