diff options
author | Aaron Plattner <aplattner@nvidia.com> | 2007-08-01 14:16:55 -0700 |
---|---|---|
committer | Aaron Plattner <aplattner@nvidia.com> | 2007-08-06 14:53:57 -0700 |
commit | 778a3f9d7136de062806473dd3604eb03ba5d866 (patch) | |
tree | 61ab1418c7202701ae1c3cdde8fb0ddc1230b7a5 | |
parent | 4838e2e9d9635883841e692a7074bcb2be96dcf5 (diff) |
Return a bool from pixman_image_unref.pixman-0.9.4
Returns TRUE when the refcount reaches 0 and the image is freed.
-rw-r--r-- | pixman/pixman-image.c | 7 | ||||
-rw-r--r-- | pixman/pixman.h | 2 |
2 files changed, 7 insertions, 2 deletions
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 @@ pixman_image_ref (pixman_image_t *image) 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 @@ pixman_image_unref (pixman_image_t *image) 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 @@ pixman_image_t *pixman_image_create_bits (pixman_format_code_t /* 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 */ |